pjeby / hot-reload

Automatically reload Obsidian plugins in development when their files are changed
ISC License
496 stars 23 forks source link

Does this only work for one plugin? #6

Closed sntrenter closed 7 months ago

sntrenter commented 1 year ago

I have two sample plugins in a plugin directory and it seems to only hotreload the first one?

pjeby commented 1 year ago

I don't know what you mean by "two sample plugins in a plugin directory" here: Obsidian keeps every plugin in a different directory, so if you have two plugins in the same directory that wouldn't work even without hot reload. Obsidian plugins files are always named something like .obsidian/plugins/some-plugin/main.js where the some-plugin part has to be unique. So unless you mean you have two plugins, .obsidian/plugins/plugin1/main.js and .obsidian/plugins/plugin2/main.js, then I'm not sure what you're getting at here.

If you do mean the normal thing (i.e. plugin1/main.js and plugin2/main.js), then check to make sure you've enabled both plugins in Obsidian and that they function normally before you enable hot-reload.