systemjs-webpack-interop (v2.3.7) helps create webpack bundles consumable by SystemJS as in-browser modules. It dynamically sets the webpack public path based on the URL from which a SystemJS module was loaded, and provides utilities to verify webpack config interop. The package ships TypeScript types, supports webpack 4 and 5, and requires systemjs>=6. It offers both a webpack plugin (SystemJSPublicPathWebpackPlugin) and code-based approaches for auto public path setting. Active maintenance, with frequent fixes for IE11 compatibility and Windows paths.
npm install systemjs-webpack-interopVerified import paths — ran on the pinned version, not inferred.
Shows how to configure webpack for SystemJS interop using the plugin and auto-public-path import.
Remove systemjsModuleName when using webpack 5.
Use auto-public-path import or the webpack plugin instead.
Use rootDirectoryLevel >= 1, where 1 means current directory.
Include polyfills (e.g., core-js/stable/url) before loading the bundle.
Replace setPublicPath calls with import 'systemjs-webpack-interop/auto-public-path' or SystemJSPublicPathWebpackPlugin.
Update to v2.3.3+ which encodes SystemJS module name for Windows compatibility.
Ensure the bundle is loaded via SystemJS import map for correct behavior.
Run npm install systemjs-webpack-interop and ensure import path is correct: 'systemjs-webpack-interop/auto-public-path' (without file extension).
Use: const SystemJSPublicPathWebpackPlugin = require('systemjs-webpack-interop/SystemJSPublicPathWebpackPlugin').default; or import SystemJSPublicPathWebpackPlugin from 'systemjs-webpack-interop/SystemJSPublicPathWebpackPlugin';Ensure systemjs-webpack-interop is in package.json dependencies and npm install (or yarn install) has been run.
Update to v2.3.5+ which removed destructuring, or use polyfills.
Use the auto-public-path subpath import or the webpack plugin instead.