Skip to content

Commit 4a0cef1

Browse files
authored
docs(cn): modify some words
1 parent a3ff75b commit 4a0cef1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guide/dep-pre-bundling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default defineConfig({
6767

6868
默认的依赖项发现为启发式可能并不总是可取的。在你想要显式地从列表中包含/排除依赖项的情况下, 请使用 [`optimizeDeps` 配置项](/config/dep-optimization-options.md)
6969

70-
`optimizeDeps.include``optimizeDeps.exclude` 的一个典型使用场景, Vite 在源码中不能直接发现 import 的时候。例如,import 可能是插件转换的结果。这意味着 Vite 无法在初始扫描时发现 import —— 它只能在浏览器请求文件时转换后才能发现。这将导致服务器在启动后立即重新打包。
70+
`optimizeDeps.include``optimizeDeps.exclude` 的一个典型使用场景,是当 Vite 在源码中无法直接发现 import 的时候。例如,import 可能是插件转换的结果。这意味着 Vite 无法在初始扫描时发现 import —— 只能在文件被浏览器请求并转换后才能发现。这将导致服务器在启动后立即重新打包。
7171

7272
`include``exclude` 都可以用来处理这个问题。如果依赖项很大(包含很多内部模块)或者是 CommonJS,那么你应该包含它;如果依赖项很小,并且已经是有效的 ESM,则可以排除它,让浏览器直接加载它。
7373

0 commit comments

Comments
 (0)