Registry / devops / webpack-config-single-spa-react-ts

webpack-config-single-spa-react-ts

JSON →
library8.0.0jsnpmunverified

Shareable webpack configuration for single-spa React microfrontends using TypeScript. Provides a pre-configured webpack setup that handles TypeScript compilation, React JSX transform, CSS processing, and the single-spa lifecycle. Current stable version is 8.0.0, released as part of the create-single-spa monorepo with frequent updates. Differentiates from manual webpack setups by automatically integrating single-spa's standalone plugin and optimizing for microfrontend development. Supports both development and production builds, with hot module replacement and standalone single-spa setup out of the box.

npm install webpack-config-single-spa-react-ts
INSTALL
IMPORT
SIG · WEBPACK-CONFIG-SIN
W
webpack-config-single-spa-react-ts
devopsjavascriptv8.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
const webpackConfig = require('webpack-config-single-spa-react-ts')
import webpackConfig from 'webpack-config-single-spa-react-ts'
This is a CommonJS module; ESM import may not work in all Node versions.
webpackConfigSingleSpaReactTs
const { webpackConfigSingleSpaReactTs } = require('webpack-config-single-spa-react-ts')
const { config } = require('webpack-config-single-spa-react-ts')
Named export is available but default export is most common.
merge
const { merge } = require('webpack-merge')
const { merge } = require('webpack-config-single-spa-react-ts')
merge is from webpack-merge, not this package.

Shows how to use the config with custom webpack-merge override for SVG support.

// webpack.config.js const singleSpaReactTs = require('webpack-config-single-spa-react-ts'); const webpackMerge = require('webpack-merge'); module.exports = (env) => { const baseConfig = singleSpaReactTs.default({ orgName: 'my-org', projectName: 'my-app', entry: './src/my-org-my-app.js', }); return webpackMerge.merge(baseConfig, { // custom webpack config module: { rules: [ { test: /\.svg$/, use: ['@svgr/webpack'], }, ], }, }); };
Debug
Known issues
gotchaThe config expects the entry file to export single-spa lifecycle hooks. If your entry file does not export bootstrap, mount, and unmount, the microfrontend will not work.
fix
Ensure your entry file exports the required lifecycle hooks as described in single-spa docs.
affects: >=6.0.0
breakingIn version 8.0.0, the standalone plugin was upgraded. If you rely on older standalone behavior, your configuration may break.
fix
Check the standalone-single-spa-webpack-plugin changelog and update your config accordingly.
affects: >=8.0.0
deprecatedThe option 'webpackConfigEnv.reactVersion' has been deprecated. Use the react version defined in your package.json instead.
fix
Remove the reactVersion option from your config; the package now reads the version from node_modules.
affects: >=7.0.0
Errors
Common errors & fixes
Module not found: Error: Can't resolve 'react-dom'
React or ReactDOM not installed as dependencies
fix
npm install react react-dom
TypeError: singleSpaReactTs.default is not a function
Incorrect import style; using ES import instead of require
fix
Use require('webpack-config-single-spa-react-ts') instead of import
Configuration 'orgName' is required
Missing required 'orgName' option when calling the config function
fix
Pass an options object with 'orgName' property (e.g., { orgName: 'my-org' })
Upgrade
Version history
8.0.0latest on npm
Audit
Dependencies
webpackrequiredcore build tool
webpack-clirequiredrequired for running webpack commands
webpack-config-single-spa-reactrequiredbase configuration for React microfrontends
webpack-config-single-spa-tsrequiredbase configuration for TypeScript support
typescriptrequiredrequired for TypeScript compilation
Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
webpack-config-single-spa-react-ts — npm install webpack-config-single-spa-react-ts · libregistry