Closed laurent22 closed 4 months ago
Thank you for reporting this — the exports.default
is generated by Webpack from this file.
I suspect that this is because Webpack is trying to generate CommonJS modules for scripts referenced in extraScripts
:
https://github.com/personalizedrefrigerator/joplin-plugin-revealjs-slides/blob/744832080b4be46388d346cf38ffe2d143f333f1/webpack.config.js#L265-L267
This script is then loaded as a Markdown-it asset, rather than a plugin: https://github.com/personalizedrefrigerator/joplin-plugin-revealjs-slides/blob/744832080b4be46388d346cf38ffe2d143f333f1/src/contentScripts/markdownIt.ts#L5
The Markdown-it and CodeMirror content scripts probably do not cause this error because:
exports
before running the plugin script. I've also noticed this with other plugins that show dialogs with content scripts that have been processed by Webpack (e.g. the Freehand Drawing plugin).
window.exports = {};
to the note viewer and dialog webviews.contentScripts
) to plugin.config.json
. Extra scripts specified with this key would be generated with a libraryTarget
that works in an iframe/WebView.Fixed upstream.
Not sure if it affects functionalities but I'm getting the below error in the console, while running in dev mode:
which points to this line: