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