Is your feature request related to a problem? Please describe.
Svelte is compiled to JavaScript, and takes some effort to integrate with Deno
Describe the solution you'd like
Deno to have a flag to compile Svelte components
Describe alternatives you've considered
Using React or Vue
How important is this feature to you?
Extremely, I love Svelte and my #1 priority for any new project is using Svelte as a front end framework, but I'm not an experienced developer and I'm struggling to integrate Svelte and Deno.
Additional context
I believe Svelte is the future of the front end, and Deno is the future of server-side JavaScript. If the two worked out of the box together I think it could result in a paradigm shift for extremely performant, low bundle size web apps with a far better developer experience than what is currently available with Node.js / React etc.
I love this idea and I agree that integrating with frontend frameworks would be super cool! However, this functionality would probably fit better as a third party library or framework
I raised the comment on Svelte quite a while ago (2 months +). The response they gave me and some others interested was it would be troublesome, due to the close relation between Svelte and Node. The right way would be to use Deno compilers API, but that required some work on the Svelte side, not Deno side.
I see however that Deno is better fitted to work with libraries that require compilation than Node, so we should see some benefits coming from it when it finally happens.
Be patient though, adoption is a long process and Deno's history is only begun
I'm not very experienced, I've only started with Svelte and I haven't done much server-side, but is it feasible to have Svelte compiling JavaScript with 'rollup -c -w', and have Deno running in a separate process while developing for hot reloading? And then when you ship your app you only retain the compiled JavaScript bundle, leave out everything Node.js related because it's done the job of compiling Svelte, and the server-side code will be running on Deno?
It seems relatively simple just a little manual, or am I missing something here that makes this unfeasible?
I develop in React and follow a similar process, though I do the step of transpilation with Node/Parcel. I writed my app server in top of Deno, so yeah, that is a possibility in the meanwhile
Deno to have a flag to compile Svelte components
It's not Deno that needs to support Svelte, but Svelte that needs to support Deno. This is not specific to Svelte, but every framework, library and script out there.
Deno is a runtime and can't arbitrarily support some syntax. It needs to stay close to a commonly agreed upon spec, that code wanting to run on that runtime implements. This is what ECMAScript (and as an extension TypeScript) is. A framework may invent any syntax it wants, but to run it needs to compile its code down to the common spec. Imagine where we would end up if every framework and library would get its own runtime flag.
Give the frameworks some time, and they will surely adopt Deno. Deno adheres to the ES spec in contrast to Node (events, streams, fetch, etc.). Having a spec compliant runtime makes it compatible with the browsers, which is hugely valuable.
Not an issue of Deno.
No worries @zjopy I'll close this, and hopefully, someone creates a framework for this in the future (maybe me in a couple of years when I know more). For now, I'll use Sapper / Node.js
Most helpful comment
It's not Deno that needs to support Svelte, but Svelte that needs to support Deno. This is not specific to Svelte, but every framework, library and script out there.
Deno is a runtime and can't arbitrarily support some syntax. It needs to stay close to a commonly agreed upon spec, that code wanting to run on that runtime implements. This is what ECMAScript (and as an extension TypeScript) is. A framework may invent any syntax it wants, but to run it needs to compile its code down to the common spec. Imagine where we would end up if every framework and library would get its own runtime flag.
Give the frameworks some time, and they will surely adopt Deno. Deno adheres to the ES spec in contrast to Node (events, streams, fetch, etc.). Having a spec compliant runtime makes it compatible with the browsers, which is hugely valuable.
Not an issue of Deno.