From 23ca082af78e0b0ab916704afc72d28aa439b14c Mon Sep 17 00:00:00 2001 From: Sietse Snel Date: Fri, 4 Oct 2024 14:00:28 +0200 Subject: [PATCH] CI: add check for webpack development mode Uploaded webpack files should be produced in production mode rather than development mode. --- .github/workflows/javascript.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/javascript.yml b/.github/workflows/javascript.yml index 257e5a0c..fe479c3c 100644 --- a/.github/workflows/javascript.yml +++ b/.github/workflows/javascript.yml @@ -21,3 +21,10 @@ jobs: - name: Lint with standard run: | standard + + - name: Check for webpack bundles produced in development mode + run: | + if grep -l 'ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").' $(find . -name "*.js") + then echo "Error: found a webpack bundle that was produced in development mode (needs to be production mode)" + exit 1 + fi