-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsconfig.node.json
More file actions
44 lines (36 loc) · 1.16 KB
/
tsconfig.node.json
File metadata and controls
44 lines (36 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
"extends": "@electron-toolkit/tsconfig/tsconfig.node.json",
"include": [
"electron.vite.config.*",
"src/main/**/*",
"src/preload/**/*",
"src/shared/**/*"
],
"compilerOptions": {
// 启用 Bundler 模式解析(取代 baseUrl)
"moduleResolution": "bundler",
// 指定模块系统
"module": "CommonJS",
"target": "ESNext",
// 兼容 ESM 和 CommonJS 导入
"esModuleInterop": true,
// Electron-Vite 类型
"types": ["electron-vite/node"],
// 启用项目引用
"composite": true,
// 为暂时兼容 TypeScript 6 警告(静音 baseUrl 弃用提示)
"ignoreDeprecations": "6.0",
// === ⚡ 新的路径别名写法 ===
// 在 moduleResolution: "bundler" 模式下,paths 仍然生效
"paths": {
"@shared/*": ["./src/shared/*"],
"@sharedType/*": ["./src/shared/types/dtos/*"],
"@features/*": ["./src/main/features/*"],
"@handlers/*": ["./src/main/features/handlers/*"],
"@services/*": ["./src/main/features/services/*"],
"@main/*": ["./src/main/*"],
"@preload/*": ["./src/preload/*"],
"@nodeUtils/*": ["./src/main/utils/*"]
}
}
}