0
How to compile and run svelte in browser ?
Can the following cdn url or any other svelte cdn do compilation in browser ? https://code.sololearn.com/WL5WVTYEhBEQ/?ref=app
1 Respuesta
+ 1
You can compile it with svelte.compile it takes in a string and returns the compiled code for the component. You will have a terrible dx doing it this way, and half of the point of svelte is the dx so I wouldn't recommend it. Also it would make svelte very slow which removes the other benefits of svelte, so basically if you are forced to do non compiled js I would recommend react,vue, or ractive
by the way that is how the svelte repl works