woutdp / live_svelte

Svelte inside Phoenix LiveView with seamless end-to-end reactivity
https://hexdocs.pm/live_svelte
MIT License
1.18k stars 44 forks source link

Question: live_svelte with Petal components #145

Closed camstuart closed 1 day ago

camstuart commented 2 weeks ago

Hello,

Petal components require esbuild as far a I can tell, which the docs for live_svelte say to remove.

Has anyone used live_svelte with Petal successfully?

Thanks

woutdp commented 2 weeks ago

Hi!

We still use esbuild, but instead of using the out of the box basic esbuild Phoenix setup, we use a custom setup which is required because we need deeper access to the build step. It's the same setup as outlined in the official docs: https://hexdocs.pm/phoenix/asset_management.html#esbuild-plugins

Not too familiar with Petal as I haven't used it before, so can't comment on if the custom build step messes up things for that project. In any case esbuild is still being used, just in a more advanced way that doesn't use the Elixir esbuild package

camstuart commented 2 weeks ago

Ok thanks @woutdp I'll have a go getting them working together and leave any notes here if there is anything interesting