From 9bb0decb30c9778f5cf6b02781894a8287862e59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Mon, 19 Sep 2022 15:14:39 +0200 Subject: [PATCH] fix(build) speed up webpack dev build by 4x Skip type checking, only do it in prod builds (the CI will check those). Main bundle build times: - Before: 255101ms - After: 58463ms --- webpack.config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 0e866ae1e..6a1f150e3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -176,7 +176,10 @@ function getConfig(options = {}) { }, { test: /\.tsx?$/, exclude: /node_modules/, - loader: 'ts-loader' + loader: 'ts-loader', + options: { + transpileOnly: !isProduction // Skip type checking for dev builds. + } } ] }, node: {