Optimize build configuration.
parent
1dbafb6c97
commit
6cff7138f0
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "CommonJS",
|
||||
"target": "ES2019",
|
||||
"outDir": "out",
|
||||
"esModuleInterop": true,
|
||||
|
|
|
@ -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…
Reference in New Issue