woutdp / live_svelte

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

build.js for esbuild 0.17+ #67

Open dev-guy opened 10 months ago

dev-guy commented 10 months ago

Thank you for updating build.js to use svelte-preprocess!

I ran mix live_svelte.setup with live_svelte version 0.11.0. build.js only works with esbuild version 0.16.x and earlier because the 'watch' implementation changed.

If you don't pin esbuild to version 0.16.x in package.json, build.js should look something like this.

woutdp commented 10 months ago

Is this the same issue as: https://github.com/woutdp/live_svelte/issues/29

dev-guy commented 10 months ago

Per #29, this doesn't work in Docker? I don't recall where I saw that. If the old watch style is required by build.js, I think the README should specify pinning the version of esbuild and perhaps mention this issue if users want to upgrade.

woutdp commented 10 months ago

It's something I have to take a look at again, if I can make the new version work I'll update the build.js file to use the latest version