Skip to content

Commit

Permalink
Disable standalone mode unless explicitly set (#431)
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldenning authored Dec 18, 2024
1 parent a91dc12 commit f3fcb82
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/tasty-knives-compete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"webpack-config-single-spa": major
---

Disable standalone mode unless explicitly set
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ function webpackConfigSingleSpa(opts) {

let argv = opts.argv || {};

let isProduction = argv.p || argv.mode === "production";
let isProduction =
argv.p || argv.mode === "production" || webpackConfigEnv.WEBPACK_BUILD;

const isStandalone = webpackConfigEnv.standalone;

let HtmlWebpackPlugin = opts.HtmlWebpackPlugin || _HtmlWebpackPlugin;

Expand Down Expand Up @@ -135,7 +138,7 @@ function webpackConfigSingleSpa(opts) {
rootDirectoryLevel: opts.rootDirectoryLevel,
}),
!isProduction && !opts.disableHtmlGeneration && new HtmlWebpackPlugin(),
!isProduction &&
isStandalone &&
!opts.disableHtmlGeneration &&
new StandaloneSingleSpaPlugin({
appOrParcelName: `@${opts.orgName}/${opts.projectName}`,
Expand Down

0 comments on commit f3fcb82

Please sign in to comment.