Replies: 5 comments 7 replies
-
The compiled templates appear to use https://github.com/ryansolid/dom-expressions - hopefully that can be imported into Deno with a CDN! Here is the babel plugin that includes what I think of as a template compiler: https://github.com/ryansolid/dom-expressions/tree/main/packages/babel-plugin-jsx-dom-expressions |
Beta Was this translation helpful? Give feedback.
-
I made a little bit of progress on this: I'm getting this with babel-standalone:
|
Beta Was this translation helpful? Give feedback.
-
In case it is helpful, I tried getting a version of solid server-side rendering with deno here: https://github.com/modderme123/solid-deno |
Beta Was this translation helpful? Give feedback.
-
Write a gist to demonstrate how to compile & bundle SolidJS for browsers with Deno: https://gist.github.com/kidonng/b8273a55854bbe8f1402f188755632e3 You can build local files by running the gist: deno run \
--import-map https://gist.github.com/kidonng/b8273a55854bbe8f1402f188755632e3/raw/import_map.json \
-A https://gist.github.com/kidonng/b8273a55854bbe8f1402f188755632e3/raw/deno-solid.ts \
<file> |
Beta Was this translation helpful? Give feedback.
-
4 days ago esbuild deno plugin got npm specifier support 🎉, now you don't need difficult import maps, you can use "npm:solid-js", I have an example here: https://github.com/Ciantic/deno-solidjs In short you only need this: const result = await esbuild.build({
entryPoints: [file],
outfile: outFile,
bundle: true,
format: "esm",
treeShaking: true,
minify: true,
plugins: [
denoResolver,
// Solid handles the JSX, so it needs to be sandwiched between the deno plugins
solidPlugin({
solid: {
moduleName: 'npm:solid-js/web', // <-- NOTICE THIS
},
}) as any,
denoLoader
],
}); |
Beta Was this translation helpful? Give feedback.
-
There's a thread about adding Deno support to Solid.js, but I think it can already be made to work with Deno, with a build step, that is in Deno. The main reason I think it will work is because there's a Solid playground, and because Deno is designed to run a lot of what can be ran in the browser.
There are Deno friendly CDN for npm modules: https://deno.land/[email protected]/npm_nodejs/cdns#deno-friendly-cdns
Here are the pieces of the puzzle that I see:
deno bundle
Once an example is created, we should make it easy to find. Then Solid will tick another box. I think Solid and Deno are philosophically aligned in a lot of ways.
Do you think this will work? Am I missing anything?
Beta Was this translation helpful? Give feedback.
All reactions