Trying SolidJS + Deno + ViteJS + Solid-Router + TailwindCSS, would love some help :)
Hello, all ๐
I'm trying to run SolidJS with Deno & ViteJS, thus I'm using a new plugin made by community to help ViteJS reolsve deno module (vite-deno-plugin).
I have several problem with this repo, I don't have Solid-Refresh, The router does not work ๐
and when I build (vite build), Rollup stop because he cannot found
memo
inside solid-js package.
If anyone has enough knowledge with build and ESM module, I'll be happy to receive some help in order to make it work ๐
Here is the repo: https://github.com/carere/solid-router-deno-vitejs-tailwindGitHub
GitHub - carere/solid-router-deno-vitejs-tailwind: Repo for demonst...
Repo for demonstrating SolidJS + Solid-router + Deno + ViteJS + TailwindCSS - carere/solid-router-deno-vitejs-tailwind
10 Replies
It's probably easiest to wait for Deno to support SolidStart, and then take it from there by setting
ssr:false
. Support for that does appear to be quite close.
https://github.com/denoland/deno/issues/20604GitHub
Support SolidStart (SolidJS/Vite based) ยท Issue #20604 ยท denoland/d...
Platform Darwin 22.6.0 arm64 arm Version deno 1.37.0 Repro deno run -A npm:create-solid deno task dev Expected Dev server start Actual โ deno task dev Warning Currently only basic package.json `scr...
@Birk Skyum Do you mind trying my repository ? I don't use SolidStart and it works in dev mode with the vue-deno-plugin. You may found something useful that I cannot see due to my lacking knowledge of all the bundle fuzz ๐
The problem occurs when trying to build with vite
Yeah, i tried just now and it's certainly not in a good place. Deno team is working on better node compat, but it's really not here yet for frontend work, and every month a new major undertaking in annouced taking up all dev resources - the flavor of the month being jsr.io, so while it's an extremely innovative team, the node compat just stuggles to make it to the top of the list in practice.
Ok nice to know, guess we have to wait ๐
@Birk Skyum Thx to the author of
vite-deno-plugin
I updated my repo, and now I can build the app with vitejs. The only problem is that the router does not seems to work properly (if you go directly to a route through the search bar, it works, but when you click on a link it does not switch the content, it just update the browser history). Maybe you can see what's going wrong here ?
Also, I saw that the Route
components exported from https://esm.sh/@solidjs/[email protected]?target=esnext is not typed correctly, but the Router is. It's maybe a problem with the bundling of solid-router ?
Also, I'm not using SolidStart for this project since it's a SPA, so it may help avoid all the fuzz about server stuff, and only focus on ViteJS + SolidJs + Solid-router on Denoavoid all the fuzz about server stuff,This is literally a matter of setting the
ssr: false
in app.config.ts, but okay, let's explore how we can make this setup work.
I can't see any references in to vite-deno-plugin or vite-plugin-deno in the repo. Where is it being used?In the vite.config.mts file, it's a vite plugin
gotcha
why even use deno
Because way more enjoyable than node ๐
but u lose ssr
and possibly buggy