Replies: 2 comments 1 reply
-
|
esbulid supports Deno: https://esbuild.github.io/getting-started/#deno That is a modern bundler for the front-end. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
I'm very interested in writing front-end browser js using
Denoand modules.Denoglobal would have to be accounted for in some way.Viteis this something thatDenowould want to do?Denoever consider parsing.svelte/.vue/.astrofiles through imports? Perhaps provide guidelines on how to write these inDenoand having the module built be served in.ts? Are there anyDenopackage servers that can take say aYAMLfile and convert it to a.tsfile and cache it on the server? Perhaps some structure for passing these files through as modules (.svelte.ts,.vue.ts,.astro.ts, even.html.ts)?My concern is that with the rise of js / ts in custom files vue astro svelte that compile to typescript but aren't, it will prevent deno as viably being used to write front-end code because these modules won't really work as normal deno modules unless you convert them to ts and distribute those.
One idea is to use a server to parse raw files and convert them to typescript on the fly something like
https://deno.land/convert/sveltePerhaps with an import map you can convert
https://deno.land/x/my-svelte-module/example.sveltetohttps://deno.land/convert/svelte?source=https://deno.land/x/my-svelte-module/example.sveltePerhaps deno support for
vite+esbuildwill be enough.I'm just a little confused about 3rd deno module imports within non-ts files and how bundlers will work within deno modules.
Here's an example from
svelteimporting anpmpackage.If this is to a single deno file
tsfile granted that would work, the bundler can ignore URLS and pass the build to deno (like astro does). But if this is to another svelte file likehttps://deno.land/x/my-svelte-module/example.svelte? That's not really possible. But it is possible withnpmin a package likemy-svelte-module/example.svelte.Deno has support for static files via
fs.readFileandimport.meta, but it doesn't have the ability to crawl dependencies recursively for non.tsfiles.vitejs/vite#109
https://dev.to/vonheikemen/vite-and-deno-an-experiment-1jdf
https://www.youtube.com/watch?v=jwtkxSLJqlk
34 votes ·
Beta Was this translation helpful? Give feedback.
All reactions