From beff450c583f563070e38fb5f1634bc1690418d7 Mon Sep 17 00:00:00 2001 From: Atreya Bain Date: Sun, 18 Apr 2021 11:52:42 +0530 Subject: [PATCH] [webpack] minify aggresively --- client/webpack.config.js | 9 +++++++-- package.json | 2 +- server/webpack.config.js | 9 +++++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/client/webpack.config.js b/client/webpack.config.js index 3fb8b91..f0e597a 100644 --- a/client/webpack.config.js +++ b/client/webpack.config.js @@ -18,16 +18,21 @@ const config = { libraryTarget: 'commonjs2', devtoolModuleFilenameTemplate: '../[resource-path]' }, - devtool: 'source-map', + // devtool: 'source-map', externals: { vscode: 'commonjs vscode' // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/ }, + optimization:{ + minimize:true, + innerGraph:true, + usedExports:true + }, resolve: { // support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader extensions: ['.ts', '.js'], plugins:[] }, - stats:'minimal', + // stats:'minimal', module: { rules: [ { diff --git a/package.json b/package.json index 0015a33..cefa684 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "author": "Atreya Bain", "license": "MIT", "publisher": "atreyabain", - "version": "0.0.3", + "version": "0.0.4", "icon": "assets/128.png", "categories": [], "keywords": [ diff --git a/server/webpack.config.js b/server/webpack.config.js index b2ace2c..5c3e7a4 100644 --- a/server/webpack.config.js +++ b/server/webpack.config.js @@ -17,11 +17,16 @@ const config = { libraryTarget: 'commonjs2', devtoolModuleFilenameTemplate: '../[resource-path]' }, - stats:'minimal', - devtool: 'source-map', + // stats:'minimal', + // devtool: 'source-map', externals: { vscode: 'commonjs vscode' // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/ }, + optimization:{ + minimize:true, + innerGraph:true, + usedExports:true + }, resolve: { // support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader extensions: ['.ts', '.js'],