build: tree shaking

This commit is contained in:
EnixCoda 2020-03-13 09:39:10 +08:00
parent f430c7bc26
commit 069a52f0ba
No known key found for this signature in database
GPG key ID: 0C1A07377913A1DD
3 changed files with 8 additions and 7 deletions

View file

@ -3,8 +3,9 @@
[
"@babel/preset-env",
{
"modules": false,
"targets": {
"chrome": "67"
"esmodules": true
}
}
],

View file

@ -1,15 +1,13 @@
{
"compilerOptions": {
"target": "es2016",
"outDir": "dist",
"moduleResolution": "Node",
"module": "ESNext",
"target": "ESNext",
"jsx": "react",
"allowJs": true,
"module": "commonjs",
"strict": true,
"resolveJsonModule": true,
"lib": ["dom", "es2017.object", "es2016"],
"baseUrl": ".",
"experimentalDecorators": true,
"outDir": "dist",
"paths": {
"*": ["src/*", "packages/*"]
}

View file

@ -81,6 +81,8 @@ module.exports = {
cacheDirectory: true,
},
include: [srcPath, packagesPath],
exclude: /node_modules/,
sideEffects: false,
},
{
test: /\.scss$/,