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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm very interested in writing front-end browser js using
Deno
and modules.Deno
global would have to be accounted for in some way.Vite
is this something thatDeno
would want to do?Deno
ever consider parsing.svelte
/.vue
/.astro
files through imports? Perhaps provide guidelines on how to write these inDeno
and having the module built be served in.ts
? Are there anyDeno
package servers that can take say aYAML
file and convert it to a.ts
file 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/svelte
Perhaps with an import map you can convert
https://deno.land/x/my-svelte-module/example.svelte
tohttps://deno.land/convert/svelte?source=https://deno.land/x/my-svelte-module/example.svelte
Perhaps deno support for
vite
+esbuild
will 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
svelte
importing anpm
package.If this is to a single deno file
ts
file 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 withnpm
in a package likemy-svelte-module/example.svelte
.Deno has support for static files via
fs.readFile
andimport.meta
, but it doesn't have the ability to crawl dependencies recursively for non.ts
files.vitejs/vite#109
https://dev.to/vonheikemen/vite-and-deno-an-experiment-1jdf
https://www.youtube.com/watch?v=jwtkxSLJqlk
31 votes ·
Beta Was this translation helpful? Give feedback.
All reactions