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:
Martin Pitt 2020-11-22 12:44:14 +01:00 committed by Katerina Koukiou
parent 61db732b4a
commit 7fca9b9a26
2 changed files with 2 additions and 2 deletions

View file

@ -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)

View file

@ -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
})); }));
} }