7f4cfc8973
业务代码沿用 @/* (shadcn 等生态约定);仅"跳出 src/"的真实跨边界场景采用 Node 标准 #name: - #package → ./package.json:替换 @/../package.json (2 处) 这种用 alias 跳出根目录的 hack - #drizzle/*.sql → ./drizzle/*.sql:让 codegen 输出的 migrations.gen.ts 不再走 ../../../ 效果: - tsconfig.paths 与 vite.resolve.tsconfigPaths 维持,业务代码 0 改动 - 配置仅新增 package.json#imports 4 行 - Bun runtime / Vite 8 / TS bundler / 编译产物均原生支持 端到端验证: - 编译二进制:CREATE TABLE 和 'fullstack-starter' 内嵌 ✓ - ./server migrate:应用嵌入式迁移成功 ✓ - ./server 运行:/health、/api/spec.json (title/version)、RPC create+list、OpenAPI create、Scalar /api/docs 全部 OK ✓ - bun run dev:Vite SSR <title>fullstack-starter</title> 注入 ✓ - fix/typecheck/test/build/compile 全绿
69 lines
2.3 KiB
JSON
69 lines
2.3 KiB
JSON
{
|
|
"name": "fullstack-starter",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"imports": {
|
|
"#package": "./package.json",
|
|
"#drizzle/*.sql": "./drizzle/*.sql"
|
|
},
|
|
"scripts": {
|
|
"build": "bunx --bun vite build",
|
|
"cli": "bun bin.ts",
|
|
"compile": "bun compile.ts",
|
|
"compile:darwin": "bun run compile:darwin:arm64 && bun run compile:darwin:x64",
|
|
"compile:darwin:arm64": "bun compile.ts --target bun-darwin-arm64",
|
|
"compile:darwin:x64": "bun compile.ts --target bun-darwin-x64",
|
|
"compile:linux": "bun run compile:linux:x64 && bun run compile:linux:arm64",
|
|
"compile:linux:arm64": "bun compile.ts --target bun-linux-arm64",
|
|
"compile:linux:x64": "bun compile.ts --target bun-linux-x64",
|
|
"compile:windows": "bun run compile:windows:x64",
|
|
"compile:windows:x64": "bun compile.ts --target bun-windows-x64",
|
|
"db:generate": "drizzle-kit generate && bun embed-migrations.ts",
|
|
"db:embed": "bun embed-migrations.ts",
|
|
"db:migrate": "drizzle-kit migrate",
|
|
"db:push": "drizzle-kit push",
|
|
"db:studio": "drizzle-kit studio",
|
|
"dev": "bunx --bun vite dev",
|
|
"fix": "biome check --write",
|
|
"test": "bun test",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@orpc/client": "^1.14.0",
|
|
"@orpc/contract": "^1.14.0",
|
|
"@orpc/openapi": "^1.14.0",
|
|
"@orpc/server": "^1.14.0",
|
|
"@orpc/tanstack-query": "^1.14.0",
|
|
"@orpc/zod": "^1.14.0",
|
|
"@t3-oss/env-core": "^0.13.11",
|
|
"@tanstack/react-query": "^5.100.1",
|
|
"@tanstack/react-router": "^1.168.24",
|
|
"@tanstack/react-router-ssr-query": "^1.166.11",
|
|
"@tanstack/react-start": "^1.167.48",
|
|
"citty": "^0.2.2",
|
|
"drizzle-orm": "0.45.2",
|
|
"drizzle-zod": "^0.8.3",
|
|
"postgres": "^3.4.9",
|
|
"react": "^19.2.5",
|
|
"react-dom": "^19.2.5",
|
|
"uuid": "^14.0.0",
|
|
"zod": "^4.3.6"
|
|
},
|
|
"devDependencies": {
|
|
"@biomejs/biome": "^2.4.13",
|
|
"@tailwindcss/vite": "^4.2.4",
|
|
"@tanstack/devtools-vite": "^0.6.0",
|
|
"@tanstack/react-devtools": "^0.10.2",
|
|
"@tanstack/react-query-devtools": "^5.100.1",
|
|
"@tanstack/react-router-devtools": "^1.166.13",
|
|
"@types/bun": "^1.3.13",
|
|
"@vitejs/plugin-react": "^6.0.1",
|
|
"drizzle-kit": "0.31.10",
|
|
"nitro": "npm:nitro-nightly@3.0.1-20260424-182106-f8cf6ccc",
|
|
"tailwindcss": "^4.2.4",
|
|
"typescript": "^6.0.3",
|
|
"vite": "^8.0.10"
|
|
}
|
|
}
|