Fix dev script
This commit is contained in:
parent
d8cbffcfd5
commit
bdbd3f1021
1 changed files with 6 additions and 4 deletions
|
|
@ -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'],
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue