From bdbd3f10219e9ac20c916e76a841ec026ad9c468 Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Thu, 11 Jun 2026 20:06:10 +0100 Subject: [PATCH] Fix dev script --- webpack.config.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 3d181a6..4656d1a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -20,7 +20,7 @@ const htmlLoaderOptions = JSON.stringify({ minimize: false, }); -module.exports = { +module.exports = (env, argv) => ({ entry: { index: PATHS.entryPoint, }, @@ -41,6 +41,7 @@ module.exports = { }, devServer: { host: '0.0.0.0', + port: 9999, allowedHosts: 'all', }, plugins: [ @@ -61,8 +62,9 @@ module.exports = { useShortDoctype: true, }, }), - new HtmlInlineScriptPlugin(), - new HTMLInlineCSSWebpackPlugin(), + ...(argv.mode === 'production' + ? [new HtmlInlineScriptPlugin(), new HTMLInlineCSSWebpackPlugin()] + : []), ], module: { rules: [ @@ -127,4 +129,4 @@ module.exports = { resolve: { extensions: ['.ts', '.js'], }, -}; +});