Babel plugin that transforms import() and System.import() calls into a Universal Module Definition (UMD) pattern, supporting AMD, CommonJS, and global fallback. Current stable version is 4.0.0, working with Babel v7. Previous major versions support Babel v6 (v3.x) and v5 (v2.x). It provides a polyfill for dynamic import syntax for environments that lack native support, with options for Webpack's require.ensure and module ID mapping. Released on npm under MIT license, but note that native import() support in modern bundlers may reduce its necessity.
npm install babel-plugin-system-import-transformerVerified import paths — ran on the pinned version, not inferred.
Shows installation, configuration, and transformation of dynamic import to UMD pattern.
Use v3.x for Babel v6, v2.x for Babel <6.14, v1.x for Babel v5.
Ensure no other plugin transforms the same syntax, or disable the plugin if using native import support.
Configure modules option to 'common' for Node.js targets, or define global variable.
Replace System.import() with import() in source code; the plugin handles both.
Set useRequireEnsure to false (default) for standard CommonJS, or ensure Webpack is used.
Run: npm install babel-plugin-system-import-transformer --save-dev
Use plugin v3.x: npm install babel-plugin-system-import-transformer@^3.0.0 --save-dev
Ensure .babelrc has correct syntax: { "plugins": ["system-import-transformer"] }