Skip to content

Commit 095a918

Browse files
committed
Adds more granular bundle analysis
1 parent 068d520 commit 095a918

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19942,6 +19942,9 @@
1994219942
},
1994319943
"scripts": {
1994419944
"analyze:bundle": "webpack --mode production --env analyzeBundle",
19945+
"analyze:bundle:extension": "webpack --mode production --config-name extension:node --env analyzeBundle",
19946+
"analyze:bundle:extension:browser": "webpack --mode production --config-name extension:webworker --env analyzeBundle",
19947+
"analyze:bundle:webviews": "webpack --mode production --config-name webviews --env analyzeBundle",
1994519948
"analyze:deps": "webpack --env analyzeDeps",
1994619949
"build": "webpack --mode development",
1994719950
"build:quick": "webpack --mode development --env skipLint",

webpack.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ function getExtensionConfig(target, mode, env) {
183183
},
184184
mode: mode,
185185
target: target,
186-
devtool: mode === 'production' ? false : 'source-map',
186+
devtool: mode === 'production' && !env.analyzeBundle ? false : 'source-map',
187187
output: {
188188
chunkFilename: '[name].js',
189189
filename: 'gitlens.js',
@@ -420,7 +420,7 @@ function getWebviewsConfig(mode, env) {
420420
},
421421
mode: mode,
422422
target: 'web',
423-
devtool: mode === 'production' ? false : 'source-map',
423+
devtool: mode === 'production' && !env.analyzeBundle ? false : 'source-map',
424424
output: {
425425
chunkFilename: '[name].js',
426426
filename: '[name].js',

0 commit comments

Comments
 (0)