Registry / web-framework / webpack-config-single-spa-react

webpack-config-single-spa-react

JSON →
library8.0.0jsnpmunverified

A helper package for generating webpack configurations tailored for React microfrontends using single-spa. Current stable version is 8.0.0. Part of the create-single-spa ecosystem, it provides a pre-configured webpack setup that handles React JSX, CSS, asset loaders, and exposes the single-spa lifecycle hooks. It wraps webpack-config-single-spa and adds React-specific defaults. The package is designed to simplify the webpack configuration process for React apps in a microfrontend architecture, promoting consistency and best practices. It is actively maintained alongside other single-spa webpack config packages.

npm install webpack-config-single-spa-react
INSTALL
IMPORT
SIG · WEBPACK-CONFIG-SIN
W
webpack-config-single-spa-react
web-frameworkjavascriptv8.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import webpackConfigSingleSpaReact from 'webpack-config-single-spa-react'
const webpackConfigSingleSpaReact = require('webpack-config-single-spa-react')
Default export is a module that can be called or merged into webpack config. CommonJS not supported.
webpackConfigSingleSpaReact
import webpackConfigSingleSpaReact from 'webpack-config-single-spa-react'
import { webpackConfigSingleSpaReact } from 'webpack-config-single-spa-react'
This is a default export, not a named export. Named import will result in undefined.
merge
import { merge } from 'webpack-merge'
merge is not exported by this package. Use webpack-merge to combine configs.

Shows how to import and use webpackConfigSingleSpaReact in a webpack config file, returning the generated config.

const singleSpaReact = require('single-spa-react'); // webpack.config.js const webpackConfigSingleSpaReact = require('webpack-config-single-spa-react'); // Or in ESM: // import webpackConfigSingleSpaReact from 'webpack-config-single-spa-react'; module.exports = (webpackConfigEnv, argv) => { const defaultConfig = webpackConfigSingleSpaReact({ // options }); return defaultConfig; };
Debug
Known issues
breakingv8.0.0 upgraded standalone-single-spa-webpack-plugin which may require changes to standalone mode configuration.
fix
Review the changelog for standalone plugin updates and adjust your webpack config if needed.
affects: >=8.0.0
deprecatedCommonJS require() pattern is deprecated and may be removed in a future version.
fix
Use ES module import syntax.
affects: >=8.0.0
gotchaThe export is a default export, not named. Using named import will result in undefined.
fix
Use default import or require without destructuring: import foo from '...' or const foo = require('...')
affects: >=1.0.0
gotchaWebpack 5 is required; webpack 4 is not supported.
fix
Upgrade webpack to v5 or later.
affects: >=5.0.0
Errors
Common errors & fixes
Cannot find module 'webpack-config-single-spa-react'
Package not installed or import path incorrect.
fix
Run npm install webpack-config-single-spa-react --save-dev
TypeError: webpackConfigSingleSpaReact is not a function
The import is wrong (named instead of default) or variable name mismatch.
fix
Use default import: import webpackConfigSingleSpaReact from 'webpack-config-single-spa-react';
Error: webpack v4 is not supported
This package requires webpack v5+.
fix
Upgrade webpack to v5 or later.
Upgrade
Version history
8.0.0latest on npm
Audit
Dependencies
webpack-config-single-sparequiredcore webpack configuration for single-spa
webpackrequiredpeer dependency for webpack configuration
webpack-clioptionalpeer dependency for running webpack
Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
1
Resources
webpack-config-single-spa-react — npm install webpack-config-single-spa-react · libregistry