How to add/access assets in plugins

Hello, I’m trying to create a plugin that insert furigana to notes, full note, or selected text.

My issue here is: there are a few ways to do this.

  1. Access an online service with an APIkey, which the user would need to put in settings, the downside is that user needs to register and grab a key, also the app will make an online request so it won’t work offline.
  2. Use an npm like kuroshiro - npm that downloads a few dictionary files and works offline.

I’m trying to implement the second, but i’m having troubles reading the dict assets, i found a few ways to access them but i’m not sure which way will be the best approach to make this plugin work.

  1. I can add a really simple http server and serve the dict files then read locally with cors, then fetch(url)
    • issue: code a simple http server, wasting time and probably more complexity added to the plugin.
  2. I can just paste the dict inside the plugin folder and use ${app.vault.configDir}/plugin/name/dict
    • issue: seems like the plugin only downloads main, manifest and style from github, so i don’t know how to make this work.
  3. this forum post mention a few ways to access files inside the .obsidian folder or just any folder, so i can create a settings that asks the user to select a folder for the dict
    • issue: the user would need to download the dict zip separately and configure the plugin settings. This one seems to be the most feasible way to do it.
  4. this forum post asks support for assets and someone answered with code to create an element of the requested resource, but since my packet load the whole folder to use internally i don’t know how to implement this.

This is how the package reads the dictionary files

kuroshiro.init(new KuromojiAnalyzer({ dictPath: "url/to/dictFiles" }))
    .then(function () {
        return kuroshiro.convert("感じ取れたら手を繋ごう、重なるのは人生のライン and レミリア最高!", { to: "hiragana" });

Here is a preview of the files on github

TL;DR How can i store and publish a plugin that allows the user download a folder with various files to allow the plugin internally work.