Plugin: Function Plot

Thank you for reporting this! The issue seems to be caused by this Joplin commit.

Explanation of the issue:
Currently, function-plot.js stores functionPlot on the global exports object, if it exists. This upstream commit added an exports object to the note preview pane to silence a warning caused by generated Webpack code.

Previously, exports did not exist and function-plot.js stored the functionPlot function in the global self variable.

Possible fix:
I suggest 1) reverting the related upstream commit and 2) changing the default Webpack template to make extraScripts target web by default, rather than node. Such a change may also simplify loading libraries like transformers.js in a plugin.

Update: Pull request: Desktop: Fix viewer and panel plugins that check for the presence of `exports` fail to load by personalizedrefrigerator · Pull Request #10900 · laurent22/joplin · GitHub

1 Like