obsidian-developer-docs icon indicating copy to clipboard operation
obsidian-developer-docs copied to clipboard

Update "Use Svelte in your plugin" for Svelte 4

Open inhumantsar opened this issue 1 year ago • 3 comments

Note that this includes an upgrade to Typescript 5. This is working fine on my simple plugin but I'm not sure what kind of breaking changes might be lurking deeper down the stack.

Closes #92

inhumantsar avatar Apr 11 '24 16:04 inhumantsar

Can confirm that these changes worked for me (typescript 5 and the changes in commit). Only get a warning on compilerOptions.css. But doesn't seem to do harm.

> node esbuild.config.mjs
[watch] build finished, watching for changes...
compilerOptions.css as a boolean is deprecated. Use 'injected' instead of true.

bhavers avatar Apr 25 '24 23:04 bhavers

These changes worked for me as well and resolved some confusion about how to add Svelte to the plugins, given that the Obsidian sample plugin code has changed ("6. Add Svelte to the list of plugins.")

San7o avatar Jul 04 '24 23:07 San7o

@inhumantsar @hemstreet just confirming that this fixed svelte store issues that I was having as well.

dj-sf avatar Sep 03 '24 03:09 dj-sf

The guide should be updated to svelte 5 as that is the newest version now. Some stuff is a lot simpler, e.g. sveltePreprocess is no longer needed.

mProjectsCode avatar Nov 03 '24 16:11 mProjectsCode

Since the Svelte 5 PR was merged this is no longer needed. Thanks for your work!

joethei avatar Nov 14 '24 15:11 joethei