Skip to content

Commit 663cd7e

Browse files
committed
fix: resolved conflict
1 parent 0c5d223 commit 663cd7e

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

config/dep-optimization-options.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010

1111
默认情况下,Vite 会抓取你的 `index.html` 来检测需要预构建的依赖项(忽略了`node_modules``build.outDir``__tests__``coverage`)。如果指定了 `build.rollupOptions.input`,Vite 将转而去抓取这些入口点。
1212

13-
<<<<<<< HEAD
14-
如果这两者都不合你意,则可以使用此选项指定自定义条目——该值需要遵循 [tinyglobby 模式](https://github.com/SuperchupuDev/tinyglobby) ,或者是相对于 Vite 项目根目录的匹配模式数组。当显式声明了 `optimizeDeps.entries` 时默认只有 `node_modules``build.outDir` 文件夹会被忽略。如果还需忽略其他文件夹,你可以在模式列表中使用以 `!` 为前缀的、用来匹配忽略项的模式。如果你不想忽略 `node_modules``build.outDir`,你可以选择直接使用字符串路径(不使用 tinyglobby 模式)。
15-
=======
16-
If neither of these fit your needs, you can specify custom entries using this option - the value should be a [`tinyglobby` pattern](https://github.com/SuperchupuDev/tinyglobby) or array of patterns that are relative from Vite project root. This will overwrite default entries inference. Only `node_modules` and `build.outDir` folders will be ignored by default when `optimizeDeps.entries` is explicitly defined. If other folders need to be ignored, you can use an ignore pattern as part of the entries list, marked with an initial `!`. `node_modules` will not be ignored for patterns that explicitly include the string `node_modules`.
17-
>>>>>>> 76e90fdf826839457a948b34079f1cbd9f967fba
13+
如果这两者都不合你意,则可以使用此选项指定自定义条目——该值需要遵循 [tinyglobby 模式](https://github.com/SuperchupuDev/tinyglobby) ,或者是相对于 Vite 项目根目录的匹配模式数组。当显式声明了 `optimizeDeps.entries` 时默认只有 `node_modules``build.outDir` 文件夹会被忽略。如果还需忽略其他文件夹,你可以在模式列表中使用以 `!` 为前缀的、用来匹配忽略项的模式。对于明确包含字符串 `node_modules` 的模式,不会忽略 `node_modules`
1814

1915
## optimizeDeps.exclude {#optimizedeps-exclude}
2016

@@ -82,12 +78,12 @@ export default defineConfig({
8278

8379
设置为 `true` 可以强制依赖预构建,而忽略之前已经缓存过的、已经优化过的依赖。
8480

85-
## optimizeDeps.noDiscovery
81+
## optimizeDeps.noDiscovery {#optimizedeps-no-discovery}
8682

87-
- **Type:** `boolean`
88-
- **Default:** `false`
83+
- **类型:** `boolean`
84+
- **默认:** `false`
8985

90-
When set to `true`, automatic dependency discovery will be disabled and only dependencies listed in `optimizeDeps.include` will be optimized. CJS-only dependencies must be present in `optimizeDeps.include` during dev.
86+
设置为 true 时,自动依赖项发现将被禁用,并且仅优化 `optimizeDeps.include` 中列出的依赖项。在开发过程中,仅 CJS 依赖项必须存在于 `optimizeDeps.include` 中。
9187

9288
## optimizeDeps.holdUntilCrawlEnd
9389

0 commit comments

Comments
 (0)