Replies: 1 comment 2 replies
-
Awesome, thanks for sharing! Would be good to add the project(s) to https://github.com/playframework/playframework/blob/main/documentation/manual/ModuleDirectory.md - can you open a pull request for that? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I've made sbt-svelte which I believe is the best way to use Svelte with Playframework because it doesn't require you to run a separate npm process; you'd also store your Svelte files in the natural place, which is
/app/assets
.sbt-svelte hooks into Playframework's asset generation mechanism. This means you can just run
sbt run
, and it just works. All your changes will be automatically detected by Play and compiled.This requires Webpack though since Play doesn't know how to compile Svelte.
As a side note, I also built sbt-vuefy (for Vue), which utilizes the same mechanism, a few years back, and it has been working well.
I'd love for y'all to try it out.
You can read more about it here: https://tanin.nanakorn.com/main/2023/07/02/use-svelte-with-playframework
You can see the repo here: https://github.com/tanin47/sbt-svelte -- there is a test project inside as well.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions