1f92b264e1 | ||
---|---|---|
LICENSE | ||
README.md | ||
index.js | ||
package-lock.json | ||
package.json |
README.md
transform-invariant-location
A Babel plugin to annotate Flow invariant()
calls 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:
invariant(foo)
invariant(foo, "foo is missing")
After:
invariant(foo, "path/to/source.js:42")
invariant(foo, "foo is missing -- path/to/source.js:42")