Babel plugin to wrap file with iife
MIT License
Wrap file with iife.
With npm do:
npm i babel-plugin-iife-wrap --D
window.a = 1;
;(function () {
window.a = 1;
}());
In your Babel configuration:
{
"plugins": ["iife-wrap"]
}
Note that Webpack outputs a bundle wrapped with iife by default.
Pull requests are welcome. If you add functionality, then please add unit tests to cover it.
MIT © Bogdan Chadkin