Skip to content

Commit 38478fb

Browse files
authored
Merge pull request #1494 from vitejs/main
m2d
2 parents 2f6b04c + 2e97aa8 commit 38478fb

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

config/shared-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ declare const __APP_VERSION__: string
171171
- **类型:** `boolean`
172172
- **默认:** `false`
173173

174-
启用 tsconfig 路径解析功能。[tsconfig.json](file:///Users/liuxin/Project/开源/vite-docs-cn/tsconfig.json) 中的 `paths` 选项将用于解析导入。更多详情请参见[功能](/guide/features.md#paths)
174+
启用 tsconfig 路径解析功能。`tsconfig.json` 中的 `paths` 选项将用于解析导入。更多详情请参见[功能](/guide/features.md#paths)
175175

176176
## html.cspNonce
177177

guide/features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Vite 忽略 `tsconfig.json` 中的 `target` 值,遵循与 `esbuild` 相同的
101101

102102
- [TypeScript 文档](https://www.typescriptlang.org/tsconfig/#paths)
103103

104-
可以指定 `resolve.tsconfigPaths: true` 来告诉 Vite 使用 [tsconfig.json](file:///Users/liuxin/Project/开源/vite-docs-cn/tsconfig.json) 中的 `paths` 选项来解析导入。
104+
可以指定 `resolve.tsconfigPaths: true` 来告诉 Vite 使用 `tsconfig.json` 中的 `paths` 选项来解析导入。
105105

106106
需要注意的是,这个功能会有性能损耗,并且 [TypeScript 团队不建议使用这个选项来改变外部工具的行为](https://www.typescriptlang.org/tsconfig/#paths:~:text=Note%20that%20this%20feature%20does%20not%20change%20how%20import%20paths%20are%20emitted%20by%20tsc%2C%20so%20paths%20should%20only%20be%20used%20to%20inform%20TypeScript%20that%20another%20tool%20has%20this%20mapping%20and%20will%20use%20it%20at%20runtime%20or%20when%20bundling.)
107107

0 commit comments

Comments
 (0)