mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-21 09:16:30 -05:00
fix(esbuild): exclude reveal.js marked plugin
https://github.com/hedgedoc/hedgedoc/pull/4114 did not properly fix the missing speaker notes. It turns out that by just excluding reveal.js/plugin/markdown/marked.js from esbuild processing, we can stop invalid JS from being generated. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
36cc55ae8e
commit
acf24a1dd2
2 changed files with 4 additions and 9 deletions
|
@ -136,12 +136,7 @@ module.exports = {
|
||||||
{
|
{
|
||||||
context: path.join(__dirname, 'node_modules/reveal.js'),
|
context: path.join(__dirname, 'node_modules/reveal.js'),
|
||||||
from: 'plugin',
|
from: 'plugin',
|
||||||
to: 'reveal.js/plugin',
|
to: 'reveal.js/plugin'
|
||||||
transform (content, path) {
|
|
||||||
// The marked.js script wants a 'exports' variable and is referenced from plugin/notes/notes.html
|
|
||||||
// we copy, so just patch that to give it one.
|
|
||||||
return content.toString().replace('<script src="../../plugin/markdown/marked.js"></script>', '<script>var exports = {};</script><script src="../../plugin/markdown/marked.js"></script>')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -17,8 +17,8 @@ module.exports = [
|
||||||
minimizer: [
|
minimizer: [
|
||||||
new EsbuildPlugin({
|
new EsbuildPlugin({
|
||||||
target: 'es2015',
|
target: 'es2015',
|
||||||
format: "cjs",
|
format: 'cjs',
|
||||||
exclude: ['MathJax/extensions/a11y/mathmaps']
|
exclude: ['MathJax/extensions/a11y/mathmaps', 'reveal.js/plugin/markdown/marked.js']
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
splitChunks: {
|
splitChunks: {
|
||||||
|
@ -33,7 +33,7 @@ module.exports = [
|
||||||
minimizer: [
|
minimizer: [
|
||||||
new EsbuildPlugin({
|
new EsbuildPlugin({
|
||||||
target: 'es2015',
|
target: 'es2015',
|
||||||
format: "cjs"
|
format: 'cjs'
|
||||||
}),
|
}),
|
||||||
new OptimizeCSSAssetsPlugin({})
|
new OptimizeCSSAssetsPlugin({})
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue