Merge pull request #9581 from tschaub/update-webpack

Update webpack and use mode in the loader
This commit is contained in:
Tim Schaub
2019-05-20 19:43:37 -06:00
committed by GitHub
2 changed files with 2 additions and 9 deletions

View File

@@ -2,14 +2,7 @@ const build = require('../../tasks/serialize-workers').build;
function loader() {
const callback = this.async();
let minify = false;
// TODO: remove when https://github.com/webpack/webpack/issues/6496 is addressed
const compilation = this._compilation;
if (compilation) {
minify = compilation.compiler.options.mode === 'production';
}
const minify = this.mode === 'production';
build(this.resource, {minify})
.then(chunk => {

View File

@@ -97,7 +97,7 @@
"typescript": "^3.4.5",
"url-polyfill": "^1.1.5",
"walk": "^2.3.9",
"webpack": "4.31.0",
"webpack": "4.32.0",
"webpack-cli": "^3.3.2",
"webpack-dev-middleware": "^3.6.2",
"webpack-dev-server": "^3.3.1",