diff --git a/package.json b/package.json index c508f7264b..4d1ac28b58 100644 --- a/package.json +++ b/package.json @@ -203,7 +203,7 @@ "dekko": "^0.2.1", "dumi": "^2.0.17", "duplicate-package-checker-webpack-plugin": "^3.0.0", - "esbuild-loader": "^2.13.1", + "esbuild-loader": "^3.0.0", "eslint": "^8.0.0", "eslint-config-airbnb": "^19.0.0", "eslint-config-prettier": "^8.0.0", diff --git a/webpack.config.js b/webpack.config.js index 7c5d4a4048..05f6c0a700 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -2,7 +2,7 @@ // This config is for building dist files const getWebpackConfig = require('@ant-design/tools/lib/getWebpackConfig'); const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); -const { ESBuildMinifyPlugin } = require('esbuild-loader'); +const { EsbuildPlugin } = require('esbuild-loader'); const DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin'); function addLocales(webpackConfig) { @@ -33,7 +33,7 @@ if (process.env.RUN_ENV === 'PRODUCTION') { config.optimization.usedExports = true; // use esbuild if (process.env.ESBUILD || process.env.CSB_REPO) { - config.optimization.minimizer[0] = new ESBuildMinifyPlugin({ + config.optimization.minimizer[0] = new EsbuildPlugin({ target: 'es2015', css: true, });