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
+1 -8
View File
@@ -2,14 +2,7 @@ const build = require('../../tasks/serialize-workers').build;
function loader() { function loader() {
const callback = this.async(); const callback = this.async();
const minify = this.mode === 'production';
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';
}
build(this.resource, {minify}) build(this.resource, {minify})
.then(chunk => { .then(chunk => {
+1 -1
View File
@@ -97,7 +97,7 @@
"typescript": "^3.4.5", "typescript": "^3.4.5",
"url-polyfill": "^1.1.5", "url-polyfill": "^1.1.5",
"walk": "^2.3.9", "walk": "^2.3.9",
"webpack": "4.31.0", "webpack": "4.32.0",
"webpack-cli": "^3.3.2", "webpack-cli": "^3.3.2",
"webpack-dev-middleware": "^3.6.2", "webpack-dev-middleware": "^3.6.2",
"webpack-dev-server": "^3.3.1", "webpack-dev-server": "^3.3.1",