From fa7a9d9d92f90039840035db11bd69233635d4ce Mon Sep 17 00:00:00 2001 From: Bart Mesuere Date: Sun, 12 Nov 2023 17:24:59 +0100 Subject: [PATCH 1/2] don't minimize while testing --- config/webpack/webpack.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/webpack/webpack.config.js b/config/webpack/webpack.config.js index dad41f6570..729b64285e 100644 --- a/config/webpack/webpack.config.js +++ b/config/webpack/webpack.config.js @@ -62,6 +62,11 @@ if (process.env.NODE_ENV === "development") { config.devtool = "inline-source-map"; } +// disable terser minimization when running tests +if (process.env.RAILS_ENV === "test") { + config.optimization.minimize = false; +} + // Test, Staging and Production use default config module.exports = config; From bee1bc9b531684aac771edf80fbed9d0921fd854 Mon Sep 17 00:00:00 2001 From: Bart Mesuere Date: Sun, 12 Nov 2023 17:25:55 +0100 Subject: [PATCH 2/2] don't typecheck when building --- config/webpack/webpack.config.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/config/webpack/webpack.config.js b/config/webpack/webpack.config.js index 729b64285e..5aa4b11d11 100644 --- a/config/webpack/webpack.config.js +++ b/config/webpack/webpack.config.js @@ -22,7 +22,15 @@ const config = { return modulePath.endsWith('.ts') && !modulePath.endsWith('test.ts'); }, exclude: /node_modules/, - use: ["babel-loader", "ts-loader"], + use: [ + "babel-loader", + { + loader: 'ts-loader', + options: { + transpileOnly: true, + }, + } + ], }, ], }, @@ -62,7 +70,7 @@ if (process.env.NODE_ENV === "development") { config.devtool = "inline-source-map"; } -// disable terser minimization when running tests +// disable terser minimization when running if (process.env.RAILS_ENV === "test") { config.optimization.minimize = false; }