Browse Source

Optimize build configuration.

primary
CismonX 7 months ago
parent
commit
6cff7138f0
Signed by: CismonX GPG Key ID: 3094873E29A482FB
  1. 1
      tsconfig.json
  2. 9
      webpack.config.ts

1
tsconfig.json

@ -7,7 +7,6 @@
*/
{
"compilerOptions": {
"module": "CommonJS",
"target": "ES2019",
"outDir": "out",
"esModuleInterop": true,

9
webpack.config.ts

@ -19,13 +19,15 @@ const config: webpack.Configuration = {
output: {
path: path.resolve(__dirname, 'out'),
filename: 'extension.js',
libraryTarget: 'commonjs2',
library: {
type: "commonjs2",
},
devtoolModuleFilenameTemplate: '../[resource-path]',
},
devtool: isProduction ? false : 'source-map',
optimization: {
concatenateModules: true,
minimize: true,
minimize: isProduction,
minimizer: [
new TerserPlugin({
extractComments: false,
@ -39,6 +41,9 @@ const config: webpack.Configuration = {
},
mangle: {
module: true,
properties: {
regex: /^_/,
},
},
},
}),

Loading…
Cancel
Save