webpack: Compress css in production mode
Adjust the WEBPACK_TEST file, as index.css is now not reliable (in production mode it's .css.gz). Closes #395
This commit is contained in:
parent
61db732b4a
commit
7fca9b9a26
2 changed files with 2 additions and 2 deletions
2
Makefile
2
Makefile
|
|
@ -11,7 +11,7 @@ VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS)
|
||||||
# stamp file to check if/when npm install ran
|
# stamp file to check if/when npm install ran
|
||||||
NODE_MODULES_TEST=package-lock.json
|
NODE_MODULES_TEST=package-lock.json
|
||||||
# one example file in dist/ from webpack to check if that already ran
|
# one example file in dist/ from webpack to check if that already ran
|
||||||
WEBPACK_TEST=dist/index.css
|
WEBPACK_TEST=dist/manifest.json
|
||||||
|
|
||||||
all: $(WEBPACK_TEST)
|
all: $(WEBPACK_TEST)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ const plugins = [
|
||||||
/* Only minimize when in production mode */
|
/* Only minimize when in production mode */
|
||||||
if (production) {
|
if (production) {
|
||||||
plugins.unshift(new CompressionPlugin({
|
plugins.unshift(new CompressionPlugin({
|
||||||
test: /\.(js|html)$/,
|
test: /\.(js|html|css)$/,
|
||||||
deleteOriginalAssets: true
|
deleteOriginalAssets: true
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue