Skip to content

Commit ae3f0e9

Browse files
committed
feat(build): Use babel 7
1 parent 52a87d6 commit ae3f0e9

6 files changed

Lines changed: 10767 additions & 11221 deletions

File tree

.babelrc

Lines changed: 0 additions & 12 deletions
This file was deleted.

babel.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
presets: ['@babel/preset-env'],
3+
plugins: ['@babel/plugin-syntax-dynamic-import'],
4+
};

build/webpack.prod.config.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
1+
const TerserPlugin = require('terser-webpack-plugin');
22
const HtmlWebpackPlugin = require('html-webpack-plugin');
33
const merge = require('webpack-merge');
44

@@ -10,16 +10,12 @@ const PORT = process.env.PORT && Number(process.env.PORT);
1010
module.exports = merge(baseConfig, {
1111
mode: 'production',
1212
optimization: {
13+
occurrenceOrder: true,
1314
minimizer: [
14-
new UglifyJsPlugin({
15+
new TerserPlugin({
1516
cache: true,
1617
parallel: true,
17-
uglifyOptions: {
18-
compress: {
19-
// uglifyjs bug: https://github.com/webpack/webpack/issues/6567
20-
inline: false,
21-
},
22-
},
18+
sourceMap: true,
2319
}),
2420
],
2521
},

0 commit comments

Comments
 (0)