A fork from coolest repo I found in 2024, who solved the puzzle of how to run Solidjs with Router on Deno Runtime:
check it out:
https://github.com/carere/solid-router-deno-vitejs-tailwind
This example shows how to run Vite and SolidJs with vite-deno-plugin.
To start this example, run:
$ deno task dev
Refer to the ./deno.json
for the other tasks.
deno task dev
: start dev serverdeno task build
: build for productiondeno task preview
: preview production buildJust add the dependency to imports field in deno.json
.
{
"imports": {
"@solidjs/router": "https://esm.sh/@solidjs/[email protected]"
}
}
And import it.
import { Route, Routes } from "@solidjs/router";
Or you can import from URL directly.
import { Route, Routes } from "https://esm.sh/@solidjs/[email protected]";