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

mix assets.build and assets.deploy fail #68

Closed dev-guy closed 10 months ago

dev-guy commented 10 months ago

Am I using mix assets.build and mix assets.deploy correctly? They both output the same error message.

mix assets.build

Rebuilding...

Done in 1772ms.
✘ [ERROR] Could not resolve "../svelte/**/*.svelte"

    js/app.js:25:28:
      25 │ import * as Components from "../svelte/**/*.svelte"
woutdp commented 10 months ago

Try the following:

cd assets
node build.js

Does that work?

Configuration on building can be found in ./config/dev.exs

dev-guy commented 10 months ago

@woutdp Yes, I managed to get that to work, thank you, but it doesn't resolve the issue with the mix scripts. Are they supposed to work or should they be removed? The README mentions mix assets.build Or are they not supposed to be used stand-alone?

woutdp commented 10 months ago

mix assets.build is used for development of LiveSvelte. You don't have to use it if you are using LiveSvelte. Maybe it's not so clear from the documentation. Instead of saying

Development

Maybe I can change it to

LiveSvelte Development

Or something similar. Open to suggestions :)

woutdp commented 10 months ago

Should be more clear now