|
10 | 10 | }, |
11 | 11 | { |
12 | 12 | "name": "🖥️web-front", |
13 | | - "path":"front" |
| 13 | + "path":"front1" |
14 | 14 | } ,{ |
15 | 15 | "name": "⚙️web-admin", |
16 | | - "path":"front" |
| 16 | + "path":"front2" |
17 | 17 | } , { |
18 | 18 | "name": "📱sweb-mobile", |
19 | | - "path":"front" |
| 19 | + "path":"front3" |
20 | 20 | } |
21 | 21 | ], |
22 | 22 | "settings": { |
|
38 | 38 | // 搜索性能优化 |
39 | 39 | "search.useIgnoreFiles": true, |
40 | 40 | "search.useGlobalIgnoreFiles": true, |
41 | | - "search.exclude": { |
42 | | - "**/node_modules": true, |
43 | | - "**/dist": true, |
44 | | - "**/.next": true, |
45 | | - "**/coverage": true, |
46 | | - "**/yarn.lock": true, |
47 | | - "**/pnpm-lock.yaml": true, |
48 | | - "**/package-lock.json": true, |
49 | | - "**/.git": true, |
50 | | - "**/.DS_Store": true, |
51 | | - "**/*.log": true, |
52 | | - "**/.idea": true, |
53 | | - "**/.vscode": true |
54 | | - }, |
| 41 | + // 搜索使用gitignore就不用再列出了 |
| 42 | + // "search.exclude": { |
| 43 | + // "**/node_modules": true, |
| 44 | + // "**/dist": true, |
| 45 | + // "**/.next": true, |
| 46 | + // "**/coverage": true, |
| 47 | + // "**/yarn.lock": true, |
| 48 | + // "**/pnpm-lock.yaml": true, |
| 49 | + // "**/package-lock.json": true, |
| 50 | + // "**/.git": true, |
| 51 | + // "**/.DS_Store": true, |
| 52 | + // "**/*.log": true, |
| 53 | + // "**/.idea": true, |
| 54 | + // "**/.vscode": true |
| 55 | + // }, |
55 | 56 | // 禁用遥测 ,减少cpu后台任务 |
56 | 57 | "telemetry.telemetryLevel": "off", |
57 | 58 |
|
58 | 59 | //优化ts server |
59 | 60 | // 默认最大内存可能不够,防止频繁gc可以调大,特别是多个ts项目可能需要更大的内存 |
60 | | - "typescript.tsserver.maxTsServerMemory": 4096, |
| 61 | + // "typescript.tsserver.maxTsServerMemory": 4096, |
61 | 62 | // 禁用项目诊断,减少内存占用,因为项目中rsbuild已经包含了type check插件了 |
62 | 63 | "typescript.tsserver.experimental.enableProjectDiagnostics": false, |
63 | 64 | // 即使 VS Code 已经忽略 node_modules,TS Server(语言服务器)仍然会扫描和 watch 这些目录 |
64 | 65 | // 为了避免性能问题,建议在 tsconfig.json 中配置 "exclude" 来排除 node_modules |
65 | 66 | "typescript.tsserver.watchOptions": { |
66 | 67 | "excludeDirectories": ["node_modules", "dist", "build"] |
67 | 68 | }, |
| 69 | + // 禁止自动获取 @types 包,对于已经配置好 package.json 的项目,这通常是多余的网络请求和索引 |
| 70 | + "typescript.disableAutomaticTypeAcquisition": true, |
| 71 | + |
68 | 72 | // git 优化 |
69 | 73 | "git.autofetch": false, |
70 | 74 | "git.ignoreSubmodules": true, |
|
79 | 83 | "typescript", |
80 | 84 | "typescriptreact" |
81 | 85 | ], |
82 | | - |
| 86 | + |
| 87 | + // 避免把大文件当成代码解析 |
| 88 | + "files.associations": { |
| 89 | + "*.log": "plaintext", // 强制把日志文件当纯文本,不进行语法高亮分析 |
| 90 | + "*.csv": "plaintext" |
| 91 | + }, |
83 | 92 | // peacock改变颜色,便于区分不同项目 |
84 | 93 | // "workbench.colorCustomizations": { |
85 | 94 | // "activityBar.activeBackground": "#2ecef9", |
|
0 commit comments