A Babel plugin that wraps the entire file content in an Immediately Invoked Function Expression (IIFE) to avoid polluting the global scope. Current stable version 1.1.0 (latest, 2019). Simple and focused: no configuration options, works with Babel 7+. Differentiator: extremely minimal and does one thing—file-level IIFE wrapping, unlike more complex scope isolators.
npm install babel-plugin-iife-wrapVerified import paths — ran on the pinned version, not inferred.
Shows installation and basic usage: input file gets wrapped in IIFE to isolate variables from global scope.
Manually add semicolon or use a plugin like 'babel-plugin-add-import-extension' but note that this plugin does not add prefix ';'.
Do not use with ES module syntax (import/export). For modules, consider different scoping techniques.
No workaround; choose another plugin if customization is needed.
Run: npm install babel-plugin-iife-wrap --save-dev. Then in .babelrc: { "plugins": ["iife-wrap"] }Ensure @babel/core version 7+ is installed as peer dependency.