mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-06 01:21:39 -04: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: [
|
minimizer: [
|
||||||
new EsbuildPlugin({
|
new EsbuildPlugin({
|
||||||
target: 'es2015',
|
target: 'es2015',
|
||||||
|
format: "cjs",
|
||||||
exclude: ['MathJax/extensions/a11y/mathmaps']
|
exclude: ['MathJax/extensions/a11y/mathmaps']
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
|
@ -31,7 +32,8 @@ module.exports = [
|
||||||
optimization: {
|
optimization: {
|
||||||
minimizer: [
|
minimizer: [
|
||||||
new EsbuildPlugin({
|
new EsbuildPlugin({
|
||||||
target: 'es2015'
|
target: 'es2015',
|
||||||
|
format: "cjs"
|
||||||
}),
|
}),
|
||||||
new OptimizeCSSAssetsPlugin({})
|
new OptimizeCSSAssetsPlugin({})
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue