From d569c104ba12a96e075ef45e9924275d1a69ba67 Mon Sep 17 00:00:00 2001 From: "Hung-Han (Henry) Chen" <1474479+chenhunghan@users.noreply.github.com> Date: Thu, 3 Dec 2020 16:43:39 +0800 Subject: [PATCH] Set minimize: false and transpileOnly: true to speed up build, as the output will not be used in production/runtime Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com> --- webpack.extensions.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webpack.extensions.ts b/webpack.extensions.ts index 0c2829a406..ea56ad7c41 100644 --- a/webpack.extensions.ts +++ b/webpack.extensions.ts @@ -22,12 +22,18 @@ export default function (): webpack.Configuration { // e.g. require('@k8slens/extensions') libraryTarget: "commonjs" }, + optimization: { + // we don't really need minimize + // default is true + minimize: false + }, module: { rules: [ { test: /\.tsx?$/, loader: "ts-loader", options: { + transpileOnly: true, // !! ts-loader will use tsconfig.json at folder root // !! changes in tsconfig.json may have side effects // !! on '@k8slens/extensions' module