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>
This commit is contained in:
Hung-Han (Henry) Chen committed 2021-01-07 11:20:09 +08:00
1 parent de17ecb13f
commit d569c104ba
1 file changed
+6
+6
View File
@@ -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