Fix dev script

This commit is contained in:
Andras Schmelczer 2026-06-11 20:06:10 +01:00
parent d8cbffcfd5
commit bdbd3f1021

View file

@ -20,7 +20,7 @@ const htmlLoaderOptions = JSON.stringify({
minimize: false, minimize: false,
}); });
module.exports = { module.exports = (env, argv) => ({
entry: { entry: {
index: PATHS.entryPoint, index: PATHS.entryPoint,
}, },
@ -41,6 +41,7 @@ module.exports = {
}, },
devServer: { devServer: {
host: '0.0.0.0', host: '0.0.0.0',
port: 9999,
allowedHosts: 'all', allowedHosts: 'all',
}, },
plugins: [ plugins: [
@ -61,8 +62,9 @@ module.exports = {
useShortDoctype: true, useShortDoctype: true,
}, },
}), }),
new HtmlInlineScriptPlugin(), ...(argv.mode === 'production'
new HTMLInlineCSSWebpackPlugin(), ? [new HtmlInlineScriptPlugin(), new HTMLInlineCSSWebpackPlugin()]
: []),
], ],
module: { module: {
rules: [ rules: [
@ -127,4 +129,4 @@ module.exports = {
resolve: { resolve: {
extensions: ['.ts', '.js'], extensions: ['.ts', '.js'],
}, },
}; });