aboutsummaryrefslogtreecommitdiffstats
path: root/webpack.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js44
1 files changed, 6 insertions, 38 deletions
diff --git a/webpack.config.js b/webpack.config.js
index 11c92e874a..902654dd39 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -5,9 +5,8 @@ const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const LicenseCheckerWebpackPlugin = require('license-checker-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
-const TerserPlugin = require('terser-webpack-plugin');
const VueLoaderPlugin = require('vue-loader/lib/plugin');
-const {statSync} = require('fs');
+const {ESBuildMinifyPlugin} = require('esbuild-loader');
const {resolve, parse} = require('path');
const {SourceMapDevToolPlugin} = require('webpack');
@@ -78,13 +77,9 @@ module.exports = {
optimization: {
minimize: isProduction,
minimizer: [
- new TerserPlugin({
- extractComments: false,
- terserOptions: {
- output: {
- comments: false,
- },
- },
+ new ESBuildMinifyPlugin({
+ target: 'es2015',
+ minify: true
}),
new CssMinimizerPlugin({
sourceMap: true,
@@ -131,36 +126,9 @@ module.exports = {
exclude: /node_modules/,
use: [
{
- loader: 'babel-loader',
+ loader: 'esbuild-loader',
options: {
- sourceMaps: true,
- cacheDirectory: true,
- cacheCompression: false,
- cacheIdentifier: [
- resolve(__dirname, 'package.json'),
- resolve(__dirname, 'package-lock.json'),
- resolve(__dirname, 'webpack.config.js'),
- ].map((path) => statSync(path).mtime.getTime()).join(':'),
- presets: [
- [
- '@babel/preset-env',
- {
- useBuiltIns: 'usage',
- corejs: 3,
- },
- ],
- ],
- plugins: [
- [
- '@babel/plugin-transform-runtime',
- {
- regenerator: true,
- }
- ],
- ],
- generatorOpts: {
- compact: false,
- },
+ target: 'es2015'
},
},
],