From 23b6740de3d01c08502f9c9084924ae9331285e1 Mon Sep 17 00:00:00 2001 From: Joel Denning Date: Tue, 1 Oct 2024 20:56:26 -0600 Subject: [PATCH] Document webpack-config-single-spa's new outputSystemJS opt (#650) --- versioned_docs/version-6.x/shared-webpack-configs.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/versioned_docs/version-6.x/shared-webpack-configs.md b/versioned_docs/version-6.x/shared-webpack-configs.md index 1fe81b36e..c0de87f09 100644 --- a/versioned_docs/version-6.x/shared-webpack-configs.md +++ b/versioned_docs/version-6.x/shared-webpack-configs.md @@ -10,7 +10,7 @@ These packages are housed within the [create-single-spa repository](https://gith [Github project](https://github.com/single-spa/create-single-spa/tree/master/packages/webpack-config-single-spa) -A shareable, customizable webpack config that is used for single-spa modules. +A shareable, customizable webpack config that is used for single-spa modules. As of webpack-config-single-spa@6, native ES modules are outputted, by default. ### Installation @@ -42,6 +42,12 @@ module.exports = (webpackConfigEnv, argv) => { // treated as webpack externals or not. Defaults to true orgPackagesAsExternal: true, + // optional, defaults to false + // This changes the webpack output.libraryTarget so that the output bundle is in System.register() format + // Older versions of webpack-config-single-spa outputted System.register() format by default, so this + // option exists for backwards compatibility for organizations who haven't yet upgraded to SystemJS + outputSystemJS: false, + // optional, defaults to 1 // This is the rootDirectoryLevel that is passed to https://github.com/joeldenning/systemjs-webpack-interop rootDirectoryLevel: 1,