fergiemcdowall/stopword

Possible to load languages dynamically?

Closed this issue · 2 comments

I'm writing an Obsidian plugin and would like to give the user a list of languages to remove stopwords for. Is it possible to load these languages dynamically?

My plugin is currently written in commin JS, but I will switch to ESM if dynamic loading is easier that way.

Edit:
Correction. I see now that Obsidian does not seem to support ESM plugins.

Not sure if I answer your question, but you can bundle it without languages and then have something that loads a language when you need it?

Thanks.
I ended up transforming the language files to CommonJS in my esbuild script and bundled the transformed versions.