Skip to content

Commit ccc4e64

Browse files
frant1cfrant1c
authored andcommitted
fix: @ path
1 parent 2d34b33 commit ccc4e64

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

tsconfig.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
22
"files": [],
3-
"references": [
4-
{ "path": "./tsconfig.app.json" },
5-
{ "path": "./tsconfig.node.json" }
6-
]
3+
"references": [{ "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" }],
4+
"compilerOptions": {
5+
"paths": {
6+
"@/*": ["./src/*"]
7+
}
8+
}
79
}

vite.config.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
// vite.config.ts
22
import { defineConfig } from "vite"
33
import react from "@vitejs/plugin-react"
4+
import path from "path"
45

56
export default defineConfig({
67
plugins: [react()],
7-
base: "/RandomInterview/", // 确保与你的仓库名完全一致
8+
base: "/RandomInterview/",
9+
resolve: {
10+
alias: {
11+
"@": path.resolve(__dirname, "./src")
12+
}
13+
},
814
build: {
915
outDir: "dist",
1016
emptyOutDir: true

0 commit comments

Comments
 (0)