Improve build pipeline
This commit is contained in:
parent
2c26e07932
commit
d0b53678e2
2 changed files with 5 additions and 10 deletions
|
|
@ -2,17 +2,15 @@
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "lib",
|
"outDir": "lib",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"target": "es5",
|
"declaration": true,
|
||||||
"downlevelIteration": true,
|
"declarationMap": true,
|
||||||
"allowJs": true,
|
"target": "es6",
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"moduleResolution": "Node",
|
"moduleResolution": "Node",
|
||||||
"module": "es6",
|
"module": "es6",
|
||||||
"declaration": true,
|
|
||||||
"composite": true,
|
"composite": true,
|
||||||
"declarationMap": true,
|
"lib": ["dom", "es2017"]
|
||||||
"lib": ["es6", "dom", "es2017"]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,6 @@ var PATHS = {
|
||||||
bundles: path.resolve(__dirname, 'lib'),
|
bundles: path.resolve(__dirname, 'lib'),
|
||||||
};
|
};
|
||||||
|
|
||||||
const isProduction = process.env.NODE_ENV == 'production';
|
|
||||||
const isDevelopment = !isProduction;
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: {
|
entry: {
|
||||||
main: [PATHS.entryPoint],
|
main: [PATHS.entryPoint],
|
||||||
|
|
@ -31,9 +28,9 @@ module.exports = {
|
||||||
},
|
},
|
||||||
optimization: {
|
optimization: {
|
||||||
minimize: true,
|
minimize: true,
|
||||||
usedExports: true,
|
|
||||||
minimizer: [
|
minimizer: [
|
||||||
new TerserJSPlugin({
|
new TerserJSPlugin({
|
||||||
|
sourceMap: true,
|
||||||
test: /\.js$/i,
|
test: /\.js$/i,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue