A webpack plugin that enables running single-spa microfrontends in standalone mode for development, as an alternative to import-map-overrides. Current stable version is 6.0.0, released with breaking changes: moduleFormat now defaults to ESM instead of SystemJS, and HtmlWebpackPlugin option is now required. The plugin rewrites the microfrontend's HTML and JS to load and mount it as a standalone single-spa application or parcel, with support for import maps, custom props, and start options. It ships TypeScript types and requires webpack and html-webpack-plugin as peer dependencies. Key differentiators: built specifically for single-spa ecosystem, supports ESM and SystemJS module formats, integrates with import-map-overrides UI, and provides a local development experience that simulates the microfrontend being part of a larger single-spa application. However, it is not equivalent to integrated mode and has known pitfalls such as updated single-spa/SystemJS versions and missing global styles/scripts.
npm install standalone-single-spa-webpack-pluginVerified import paths — ran on the pinned version, not inferred.
Adds the standalone plugin to webpack config with HtmlWebpackPlugin, enabling development of a single-spa microfrontend in standalone mode.
If your project depends on SystemJS, set moduleFormat: 'systemjs' explicitly.
Add new HtmlWebpackPlugin() to plugins array and ensure it runs before StandaloneSingleSpaPlugin.
Upgrade html-webpack-plugin to version 4 or later.
If you need urlRerouteOnly: false, set startOptions: { urlRerouteOnly: false }.Always test in the full single-spa integration environment. Use import-map-overrides for more accurate local development.
Pin standalone plugin version or use a custom import map to control versions.
Manually add required global resources via html-webpack-plugin or a custom template.
Ensure new HtmlWebpackPlugin() is added before new StandaloneSingleSpaPlugin(...) in the plugins array.
Install single-spa: npm install single-spa
Use const StandaloneSingleSpaPlugin = require('standalone-single-spa-webpack-plugin');Ensure new HtmlWebpackPlugin() is added to plugins and/or pass the HtmlWebpackPlugin constructor as an option to StandaloneSingleSpaPlugin.