Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

babel-plugin-iife-wrap

trysound1.3kMIT1.1.0

Babel plugin to wrap file with iife

babel-plugin, iife, wrap

readme

babel-plugin-iife-wrap Build Status

Wrap file with iife.

Install

With npm do:

npm i babel-plugin-iife-wrap --D

Example

Input

window.a = 1;

Output

;(function () {
  window.a = 1;
}());

Usage

In your Babel configuration:

{
  "plugins": ["iife-wrap"]
}

Contributing

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

License

MIT © Bogdan Chadkin