From 7fca9b9a2634eeb20ca55106837620b321abe03d Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sun, 22 Nov 2020 12:44:14 +0100 Subject: [PATCH] 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 --- Makefile | 2 +- webpack.config.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8893a65..8aac539 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS) # stamp file to check if/when npm install ran NODE_MODULES_TEST=package-lock.json # 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) diff --git a/webpack.config.js b/webpack.config.js index 28540ee..e524c9a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -23,7 +23,7 @@ const plugins = [ /* Only minimize when in production mode */ if (production) { plugins.unshift(new CompressionPlugin({ - test: /\.(js|html)$/, + test: /\.(js|html|css)$/, deleteOriginalAssets: true })); }