# babel-plugin-transform-invariant-location **Repository Path**: mirrors_github/babel-plugin-transform-invariant-location ## Basic Information - **Project Name**: babel-plugin-transform-invariant-location - **Description**: Babel plugin that rewrites invariant calls with their source location - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2026-02-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # transform-invariant-location A Babel plugin to annotate [Flow `invariant()` calls](https://github.com/zertosh/invariant) with an additional string argument detailing the current file and line number. This is useful to track down exceptions that are raised by `invariant()` in minified bundles at runtime. Before: ```js invariant(foo) invariant(foo, "foo is missing") ``` After: ```js invariant(foo, "path/to/source.js:42") invariant(foo, "foo is missing -- path/to/source.js:42") ```