Skip to content
Permalink
Browse files

fix(webpack): avoid unnecessary breaking change on argument

With this fix, `au run --analyze` `au run --hmr` will continue to work.
  • Loading branch information...
3cp committed Sep 7, 2019
1 parent b5e6ca5 commit f73c4ea9ebe5fc16ea105fdcb6c35ef9cc432204
Showing with 8 additions and 8 deletions.
  1. +1 −1 package-lock.json
  2. +5 −5 skeleton/webpack/package.json
  3. +2 −2 skeleton/webpack/webpack.config.js

Some generated files are not rendered by default. Learn more.

@@ -71,15 +71,15 @@
"tree-kill": "^1.2.1",
},
"scripts": {
"build": "webpack --env.production --env.extractCss",
"build:dev": "webpack --env.extractCss",
"analyze": "webpack --env.production --env.analyze",
"build": "webpack --env.production --extractCss",
"build:dev": "webpack --extractCss",
"analyze": "webpack --env.production --analyze",
// @if feat['dotnet-core']
"start": "webpack-dev-server --env.extractCss"
"start": "webpack-dev-server --extractCss"
// @endif

// @if feat.web
"start": "webpack-dev-server --env.extractCss"
"start": "webpack-dev-server --extractCss"
// @endif
}
}
@@ -51,7 +51,7 @@ const sassRules = [
];
// @endif

module.exports = ({ production, extractCss, analyze, tests, hmr, port, host } = {}) => ({
module.exports = ({ production } = {}, {extractCss, analyze, tests, hmr, port, host } = {}) => ({
resolve: {
// @if feat.typescript
extensions: ['.ts', '.js'],
@@ -208,7 +208,7 @@ module.exports = ({ production, extractCss, analyze, tests, hmr, port, host } =
contentBase: outDir,
// serve index.html for all 404 (required for push-state)
historyApiFallback: true,
hot: hmr,
hot: hmr || project.platform.hmr,
port: port || project.platform.port,
host: host || project.platform.host
},

0 comments on commit f73c4ea

Please sign in to comment.
You can’t perform that action at this time.