Skip to content

Commit 1a98a33

Browse files
authored
chore: FIT-14: Fix webpack build for standalone apps (#7596)
1 parent fac619c commit 1a98a33

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

web/webpack.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const optimizer = () => {
6565
result.minimizer = undefined;
6666
}
6767

68-
if (process.env.MODE.startsWith("standalone")) {
68+
if (process.env.MODE?.startsWith("standalone")) {
6969
result.runtimeChunk = false;
7070
result.splitChunks = { cacheGroups: { default: false } };
7171
}
@@ -84,7 +84,7 @@ module.exports = composePlugins(
8484
withReact({ svgr: true }),
8585
(config) => {
8686
// LS entrypoint
87-
if (!process.env.MODE.startsWith("standalone")) {
87+
if (!process.env.MODE?.startsWith("standalone")) {
8888
config.entry = {
8989
main: {
9090
import: path.resolve(__dirname, "apps/labelstudio/src/main.tsx"),
@@ -270,7 +270,7 @@ module.exports = composePlugins(
270270
mode,
271271
plugins,
272272
optimization: optimizer(),
273-
devServer: process.env.MODE.startsWith("standalone")
273+
devServer: process.env.MODE?.startsWith("standalone")
274274
? {}
275275
: {
276276
// Port for the Webpack dev server

0 commit comments

Comments
 (0)