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:
parent
8efbb059e2
commit
5552be1412
1 changed files with 3 additions and 1 deletions
|
@ -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({})
|
||||
]
|
||||
|
|
Loading…
Add table
Reference in a new issue