In my plugin, I want to build a dialog containing custom HTML. The obvious course of action is to hard-code HTML in the same TypeScript file where I build the dialog but I want to see if I can make the HTML in a separate file and then read the contents of that file when needed. For example,
const html = await fs.readFile("utf-8", path.join(__dirname, "view.html"));
where fs is imported from
fs native module or a library like
The problem is that the module
path is a native module that cannot be bundled with a plugin. (here). Of course, I also cannot put the absolute path of the file.
So, what do I do ?