From 96be0cb6e3ac4e0ac158e9f64c5d44b2a5140a9a Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 17 Mar 2023 06:45:45 +0100 Subject: Update JS dependencies, Require Node.js 16 (#23528) - Update all JS dependencies - Require Node.js 16 as dictated by `esbuild-loader` - Regenerate SVG - Adapt to `esbuild-loader` breaking changes - Minor refactor in `webpack.config.js` - Tested build, monaco and swagger-ui --------- Co-authored-by: techknowlogick --- webpack.config.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'webpack.config.js') diff --git a/webpack.config.js b/webpack.config.js index ec8a195940..4949ed6a68 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -11,8 +11,8 @@ import webpack from 'webpack'; import {fileURLToPath} from 'node:url'; import {readFileSync} from 'node:fs'; -const {ESBuildMinifyPlugin} = EsBuildLoader; -const {SourceMapDevToolPlugin} = webpack; +const {EsbuildPlugin} = EsBuildLoader; +const {SourceMapDevToolPlugin, DefinePlugin} = webpack; const formatLicenseText = (licenseText) => wrapAnsi(licenseText || '', 80).trim(); const glob = (pattern) => fastGlob.sync(pattern, { @@ -90,7 +90,7 @@ export default { optimization: { minimize: isProduction, minimizer: [ - new ESBuildMinifyPlugin({ + new EsbuildPlugin({ target: 'es2015', minify: true, css: true, @@ -130,7 +130,8 @@ export default { { loader: 'esbuild-loader', options: { - target: 'es2015' + loader: 'js', + target: 'es2015', }, }, ], @@ -173,7 +174,7 @@ export default { ], }, plugins: [ - new webpack.DefinePlugin({ + new DefinePlugin({ __VUE_OPTIONS_API__: true, // at the moment, many Vue components still use the Vue Options API __VUE_PROD_DEVTOOLS__: false, // do not enable devtools support in production }), -- cgit v1.2.3