1
0
Fork 0
mirror of https://github.com/hedgedoc/hedgedoc.git synced 2025-04-17 08:37:27 +00:00

fix(bundle): force esbuild-loader to use cjs instead of iife

Beginning with esbuild-loader 3 it uses iife for web bundles to avoid
pollution of the "window" object.
However, this broke our prod bundle because some variables should go into the global namespace.

See https://github.com/esbuild-kit/esbuild-loader/releases/tag/v3.0.0

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-02-17 18:02:35 +01:00
parent 8efbb059e2
commit 5552be1412

View file

@ -17,6 +17,7 @@ module.exports = [
minimizer: [
new EsbuildPlugin({
target: 'es2015',
format: "cjs",
exclude: ['MathJax/extensions/a11y/mathmaps']
})
],
@ -31,7 +32,8 @@ module.exports = [
optimization: {
minimizer: [
new EsbuildPlugin({
target: 'es2015'
target: 'es2015',
format: "cjs"
}),
new OptimizeCSSAssetsPlugin({})
]