1.0.0 • Published 2 years ago

babel-plugin-rm-iife v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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