fix: router

This commit is contained in:
Ou 2024-10-15 17:57:22 +08:00
parent e8a2a7e6f0
commit 9aed36201a
4 changed files with 916 additions and 1555 deletions

View File

@ -59,7 +59,7 @@
"devDependencies": { "devDependencies": {
"@eslint-react/eslint-plugin": "^1.14.3", "@eslint-react/eslint-plugin": "^1.14.3",
"@iconify-json/ph": "^1.2.1", "@iconify-json/ph": "^1.2.1",
"@ourongxing/eslint-config": "3.2.3-beta.4", "@ourongxing/eslint-config": "3.2.3-beta.6",
"@ourongxing/tsconfig": "^0.0.4", "@ourongxing/tsconfig": "^0.0.4",
"@tanstack/react-query": "^5.59.9", "@tanstack/react-query": "^5.59.9",
"@tanstack/router-devtools": "^1.64.0", "@tanstack/router-devtools": "^1.64.0",
@ -87,7 +87,7 @@
"unocss": "^0.63.4", "unocss": "^0.63.4",
"unplugin-auto-import": "^0.18.3", "unplugin-auto-import": "^0.18.3",
"vite": "^5.4.8", "vite": "^5.4.8",
"vite-plugin-with-nitro": "0.0.0-beta.4", "vite-plugin-with-nitro": "0.0.0-beta.7",
"vite-tsconfig-paths": "^5.0.1", "vite-tsconfig-paths": "^5.0.1",
"vitest": "^2.1.2", "vitest": "^2.1.2",
"wrangler": "^3.80.3" "wrangler": "^3.80.3"

2459
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -25,7 +25,7 @@ export function Column({ id }: { id: ColumnID }) {
{columnIds.map(columnId => ( {columnIds.map(columnId => (
<Link <Link
key={columnId} key={columnId}
to="/s/$column" to="/c/$column"
params={{ column: columnId }} params={{ column: columnId }}
className={clsx( className={clsx(
"text-sm", "text-sm",

View File

@ -7,6 +7,7 @@ import { TanStackRouterVite } from "@tanstack/router-plugin/vite"
import tsconfigPath from "vite-tsconfig-paths" import tsconfigPath from "vite-tsconfig-paths"
import unocss from "unocss/vite" import unocss from "unocss/vite"
import dotenv from "dotenv" import dotenv from "dotenv"
import { projectDir } from "./shared/dir" import { projectDir } from "./shared/dir"
const isCF = process.env.CF_PAGES const isCF = process.env.CF_PAGES
@ -21,14 +22,13 @@ export default defineConfig({
__ENABLE_LOGIN__: ["JWT_SECRET", "G_CLIENT_ID", "G_CLIENT_SECRET"].every(k => process.env[k]), __ENABLE_LOGIN__: ["JWT_SECRET", "G_CLIENT_ID", "G_CLIENT_SECRET"].every(k => process.env[k]),
}, },
plugins: [ plugins: [
tsconfigPath(),
TanStackRouterVite({ TanStackRouterVite({
autoCodeSplitting: true, autoCodeSplitting: true,
}), }),
unocss(), unocss(),
tsconfigPath(),
react(), react(),
nitro({ ssr: false }, { nitro({
srcDir: "server",
experimental: { experimental: {
database: true, database: true,
}, },