Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable standalone mode unless explicitly set
Browse files Browse the repository at this point in the history
joeldenning committed Dec 18, 2024
1 parent a91dc12 commit 3b95b89
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
@@ -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;

@@ -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}`,

0 comments on commit 3b95b89

Please sign in to comment.