Adjust webpack config for esbuild-loader v3

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2023-02-12 21:03:24 +01:00 committed by Tilman Vatteroth
parent 846f5b3716
commit b5de88afd1

View file

@ -3,7 +3,7 @@ const htmlexport = require('./webpack.htmlexport')
const { merge } = require('webpack-merge') const { merge } = require('webpack-merge')
const path = require('path') const path = require('path')
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin') const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin')
const { ESBuildMinifyPlugin } = require('esbuild-loader') const { EsbuildPlugin } = require('esbuild-loader')
module.exports = [ module.exports = [
merge(common, { merge(common, {
@ -15,7 +15,7 @@ module.exports = [
}, },
optimization: { optimization: {
minimizer: [ minimizer: [
new ESBuildMinifyPlugin({ new EsbuildPlugin({
target: 'es2015', target: 'es2015',
exclude: ['MathJax/extensions/a11y/mathmaps'] exclude: ['MathJax/extensions/a11y/mathmaps']
}) })
@ -30,7 +30,7 @@ module.exports = [
mode: 'production', mode: 'production',
optimization: { optimization: {
minimizer: [ minimizer: [
new ESBuildMinifyPlugin({ new EsbuildPlugin({
target: 'es2015' target: 'es2015'
}), }),
new OptimizeCSSAssetsPlugin({}) new OptimizeCSSAssetsPlugin({})