{"id":20733,"library":"webpack-config-single-spa-ts","title":"webpack-config-single-spa-ts","description":"A shared Webpack configuration for single-spa microfrontends using TypeScript. Version 8.0.0 is current, with active development and semver releases. It extends webpack-config-single-spa with TypeScript support via ts-loader and fork-ts-checker-webpack-plugin. Differentiators: tailored for single-spa module system, integrates a standalone plugin for development, and abstracts complex webpack setup. Requires typescript >=4 as a peer dependency.","status":"active","version":"8.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/single-spa/create-single-spa","tags":["javascript","single-spa","microfrontends","typescript","webpack"],"install":[{"cmd":"npm install webpack-config-single-spa-ts","lang":"bash","label":"npm"},{"cmd":"yarn add webpack-config-single-spa-ts","lang":"bash","label":"yarn"},{"cmd":"pnpm add webpack-config-single-spa-ts","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency required for TypeScript compilation","package":"typescript","optional":false}],"imports":[{"note":"Package exports a default function via ESM. CommonJS require works but ESM is preferred.","wrong":"const webpackConfig = require('webpack-config-single-spa-ts')","symbol":"default","correct":"import webpackConfig from 'webpack-config-single-spa-ts'"},{"note":"ConfigOptions is exported as a type only; use import type to avoid runtime errors in TypeScript.","wrong":"import { ConfigOptions } from 'webpack-config-single-spa-ts'","symbol":"type ConfigOptions","correct":"import type { ConfigOptions } from 'webpack-config-single-spa-ts'"},{"note":"CJS usage is supported; the default export is the config function.","symbol":"require('webpack-config-single-spa-ts')","correct":"const config = require('webpack-config-single-spa-ts')"}],"quickstart":{"code":"import webpackConfig from 'webpack-config-single-spa-ts';\n\nexport default webpackConfig({\n  // Required: specify your microfrontend entry point\n  entry: './src/main.ts',\n  // Optional: output filename\n  outputFilename: 'my-app.js',\n  // Optional: disable type checking for faster builds\n  disableTypeCheck: false,\n});","lang":"typescript","description":"Basic usage: import the default config function and export its return value with an entry point."},"warnings":[{"fix":"Update standalone-single-spa-webpack-plugin to compatible version.","message":"Upgrade standalone plugin in v8.0.0","severity":"breaking","affected_versions":">=8.0.0"},{"fix":"Upgrade to v8.0.0 or manually configure ts-loader options.","message":"Older versions use ts-loader defaults that may not support TypeScript 5","severity":"deprecated","affected_versions":"<8.0.0"},{"fix":"Set `disableTypeCheck: true` in config options for faster webpack rebuilds.","message":"Type checking enabled by default slows builds; disable for development","severity":"gotcha","affected_versions":">=6.0.0"},{"fix":"Set `outputFilename` to a unique name like 'my-app.js'.","message":"Output filename must be unique per microfrontend to avoid collisions","severity":"gotcha","affected_versions":"*"},{"fix":"Upgrade Node to v16+ or pin to older version.","message":"Requires Node >=16 as of v8.0.0","severity":"deprecated","affected_versions":">=8.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run `npm install --save-dev ts-loader`","cause":"ts-loader is a peer dependency not installed automatically","error":"Module not found: Error: Can't resolve 'ts-loader'"},{"fix":"Use `import webpackConfig from 'webpack-config-single-spa-ts'` (no braces)","cause":"Importing the config incorrectly (named import instead of default)","error":"TypeError: webpackConfig is not a function"},{"fix":"Ensure webpack@5 is installed","cause":"Using an incompatible version of webpack (requires webpack 5)","error":"Configuration for rule has an unknown property 'issuer'"},{"fix":"Use `import type { ConfigOptions }`","cause":"Importing ConfigOptions as a value instead of type","error":"Type error: Property 'ConfigOptions' does not exist on type"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}