npm.io
1.0.0 • Published 3 years ago

babel-plugin-rm-iife

Licence
MIT
Version
1.0.0
Deps
0
Size
4 kB
Vulns
0
Weekly
0

babel-plugin-rm-iife Build Status

Wrap file with iife.

Install

With npm do:


npm i babel-plugin-rm-iife --D

Example

Input
(() => {
    __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
})();
Output
__webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);

Usage

In your Babel configuration:

{
  "plugins": ["babel-plugin-rm-iife"]
}

Contributing

Pull requests are welcome. If you add functionality, then please add unit tests to cover it.

License

MIT JayFate

Keywords