update: 增加路径别名
This commit is contained in:
parent
30fa7bd85a
commit
d9abb1de2f
5
bun.lock
5
bun.lock
@ -4,6 +4,7 @@
|
||||
"": {
|
||||
"name": "hono-dev",
|
||||
"dependencies": {
|
||||
"@prisma/cli": "^2.20.1",
|
||||
"hono": "^4.7.8",
|
||||
"zod": "^3.24.4",
|
||||
},
|
||||
@ -64,6 +65,8 @@
|
||||
|
||||
"@esbuild/win32-x64": ["@esbuild/win32-x64@0.25.4", "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.25.4.tgz", { "os": "win32", "cpu": "x64" }, "sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ=="],
|
||||
|
||||
"@prisma/cli": ["@prisma/cli@2.20.1", "https://registry.npmmirror.com/@prisma/cli/-/cli-2.20.1.tgz", { "dependencies": { "@prisma/engines": "2.20.0-26.60ba6551f29b17d7d6ce479e5733c70d9c00860e" }, "bin": { "prisma": "build/index.js", "prisma2": "build/index.js" } }, "sha512-/yrNDyNXLETPre/pgXG/L9zER2nINiq+Eq8pALSCApiHZBW1QrksxL9fbbxaseoW6HBs0T4UQWemu378O2mUOw=="],
|
||||
|
||||
"@prisma/config": ["@prisma/config@6.7.0", "https://registry.npmmirror.com/@prisma/config/-/config-6.7.0.tgz", { "dependencies": { "esbuild": ">=0.12 <1", "esbuild-register": "3.6.0" } }, "sha512-di8QDdvSz7DLUi3OOcCHSwxRNeW7jtGRUD2+Z3SdNE3A+pPiNT8WgUJoUyOwJmUr5t+JA2W15P78C/N+8RXrOA=="],
|
||||
|
||||
"@prisma/debug": ["@prisma/debug@6.7.0", "https://registry.npmmirror.com/@prisma/debug/-/debug-6.7.0.tgz", {}, "sha512-RabHn9emKoYFsv99RLxvfG2GHzWk2ZI1BuVzqYtmMSIcuGboHY5uFt3Q3boOREM9de6z5s3bQoyKeWnq8Fz22w=="],
|
||||
@ -99,5 +102,7 @@
|
||||
"undici-types": ["undici-types@6.21.0", "https://registry.npmmirror.com/undici-types/-/undici-types-6.21.0.tgz", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
|
||||
|
||||
"zod": ["zod@3.24.4", "https://registry.npmmirror.com/zod/-/zod-3.24.4.tgz", {}, "sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg=="],
|
||||
|
||||
"@prisma/cli/@prisma/engines": ["@prisma/engines@2.20.0-26.60ba6551f29b17d7d6ce479e5733c70d9c00860e", "https://registry.npmmirror.com/@prisma/engines/-/engines-2.20.0-26.60ba6551f29b17d7d6ce479e5733c70d9c00860e.tgz", {}, "sha512-zOWETm7DTRvlwf/CekPNSeJe6EC5bn2IFexd74wM9zgBXCZo+1sMDuNGtCqIt4Rzv8CcimEgyzrEFVq0LPV8qg=="],
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
"dev": "bun run --hot src/index.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@prisma/cli": "^2.20.1",
|
||||
"hono": "^4.7.8",
|
||||
"zod": "^3.24.4"
|
||||
},
|
||||
|
3
src/components/math.ts
Normal file
3
src/components/math.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export function add(a: number, b: number) {
|
||||
return a + b
|
||||
}
|
@ -1,9 +1,10 @@
|
||||
import { add } from "@components/math"
|
||||
import { Hono } from "hono"
|
||||
|
||||
const app = new Hono()
|
||||
|
||||
app.get("/", (c) => {
|
||||
return c.text("Hi Bun!")
|
||||
return c.text(`1 + 2 = ${add(1, 2)}`)
|
||||
})
|
||||
|
||||
export default app
|
||||
|
@ -2,6 +2,12 @@
|
||||
"compilerOptions": {
|
||||
"strict": true,
|
||||
"jsx": "react-jsx",
|
||||
"jsxImportSource": "hono/jsx"
|
||||
"jsxImportSource": "hono/jsx",
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"@*": [
|
||||
"src/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user