Skip to content

Commit

Permalink
fix(webpack): avoid unnecessary breaking change on argument
Browse files Browse the repository at this point in the history
With this fix, `au run --analyze` `au run --hmr` will continue to work.
  • Loading branch information
3cp committed Sep 8, 2019
1 parent b5e6ca5 commit f73c4ea
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions skeleton/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
4 changes: 2 additions & 2 deletions skeleton/webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down Expand Up @@ -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
},
Expand Down

0 comments on commit f73c4ea

Please sign in to comment.