S
SolidJSโ€ข10mo ago
Carere

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-tailwind
GitHub
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
Birk Skyum
Birk Skyumโ€ข10mo ago
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/20604
GitHub
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...
Carere
CarereOPโ€ข10mo ago
@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
Birk Skyum
Birk Skyumโ€ข10mo ago
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.
Carere
CarereOPโ€ข9mo ago
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 Deno
Birk Skyum
Birk Skyumโ€ข9mo ago
avoid 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?
Carere
CarereOPโ€ข9mo ago
In the vite.config.mts file, it's a vite plugin
Birk Skyum
Birk Skyumโ€ข9mo ago
gotcha
Prohar ๐Ÿ•‰
Prohar ๐Ÿ•‰โ€ข9mo ago
why even use deno
Carere
CarereOPโ€ข9mo ago
Because way more enjoyable than node ๐Ÿ™‚
Prohar ๐Ÿ•‰
Prohar ๐Ÿ•‰โ€ข9mo ago
but u lose ssr and possibly buggy
Want results from more Discord servers?
Add your server