I am developing a plugin that has a dependency or two that are recommended to be made ‘external’ when bundling. I think this is because there are some binaries or native bindings that are included as a part of the dependency. In other words, I’d be adding them to this area in the esbuild.config.mjs
file:
...
external: [
"obsidian",
"electron",
"@codemirror/autocomplete",
"@codemirror/collab",
"@codemirror/commands",
"@codemirror/language",
"@codemirror/lint",
"@codemirror/search",
"@codemirror/state",
"@codemirror/view",
"@lezer/common",
"@lezer/highlight",
"@lezer/lr",
...builtins],
My question is: will this work once the plugin is published? How are modules loaded for plugins? If there is relevant documentation please feel free to point me to it as I didn’t see any outright.
Thanks in advance!