Back to results
keithamus/rollup-plugin-inline-invariant(opens in a new tab)
Language: JavaScript
- stars
- 6
- watchers
- 1
- forks
- 0
- open issues
- 1
- Last updated
- 04/04/2020
Language: JavaScript
If you use the invariant library, then this rollup plugin is the plugin for you!
This transforms any invariant() callsite to the native throw equivalent:
// Before invariant(foo, "Foo isnt available!")
// After if (!(foo)) { throw new Error("invariant: Foo isnt available!"); }