File tree 1 file changed +1
-1
lines changed
1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export default defineConfig({
48
48
49
49
## 产物分块策略 {#chunking-strategy}
50
50
51
- 你可以配置在使用 ` build.rollupOptions.output.manualChunks ` 时各个 chunk 是如何分割的 (查看 [ Rollup 相应文档] ( https://rollupjs.org/guide/en/#outputmanualchunks ) )。到 Vite 2.8 时 ,默认的策略是将 chunk 分割为 ` index ` 和 ` vendor ` 。这对一些 SPA 来说是好的策略,但是要对每一种用例目标都提供一种通用解决方案是非常困难的 。从 Vite 2.9 起,` manualChunks ` 默认情况下不再被更改。你可以通过在配置文件中添加 ` splitVendorChunkPlugin ` 来继续使用 “分割 Vendor Chunk” 策略:
51
+ 你可以通过配置 ` build.rollupOptions.output.manualChunks ` 来自定义 chunk 分割策略 (查看 [ Rollup 相应文档] ( https://rollupjs.org/guide/en/#outputmanualchunks ) )。在 Vite 2.8 及更早版本中 ,默认的策略是将 chunk 分割为 ` index ` 和 ` vendor ` 。这对一些 SPA 来说是好的策略,但是要对所有应用场景提供一种通用解决方案是非常困难的 。从 Vite 2.9 起,` manualChunks ` 默认情况下不再被更改。你可以通过在配置文件中添加 ` splitVendorChunkPlugin ` 来继续使用 “分割 Vendor Chunk” 策略:
52
52
53
53
``` js
54
54
// vite.config.js
You can’t perform that action at this time.
0 commit comments