From 91edf685c648381e7c29f9fbe460de6d800acbd0 Mon Sep 17 00:00:00 2001 From: sjtucoder Date: Mon, 17 Jun 2024 18:01:03 +0800 Subject: [PATCH] chore: fix some comments Signed-off-by: sjtucoder --- docs/config/dep-optimization-options.md | 2 +- packages/vite/src/node/optimizer/index.ts | 4 ++-- packages/vite/src/node/server/index.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/config/dep-optimization-options.md b/docs/config/dep-optimization-options.md index be248e65d7a8bf..43152b738e483d 100644 --- a/docs/config/dep-optimization-options.md +++ b/docs/config/dep-optimization-options.md @@ -82,7 +82,7 @@ Set to `true` to force dependency pre-bundling, ignoring previously cached optim - **Type:** `boolean` - **Default:** `true` -When enabled, it will hold the first optimized deps results until all static imports are crawled on cold start. This avoids the need for full-page reloads when new dependencies are discovered and they trigger the generation of new common chunks. If all dependencies are found by the scanner plus the explicitely defined ones in `include`, it is better to disable this option to let the browser process more requests in parallel. +When enabled, it will hold the first optimized deps results until all static imports are crawled on cold start. This avoids the need for full-page reloads when new dependencies are discovered and they trigger the generation of new common chunks. If all dependencies are found by the scanner plus the explicitly defined ones in `include`, it is better to disable this option to let the browser process more requests in parallel. ## optimizeDeps.disabled diff --git a/packages/vite/src/node/optimizer/index.ts b/packages/vite/src/node/optimizer/index.ts index 5902aa96e9eb4f..e62d78fdf1b956 100644 --- a/packages/vite/src/node/optimizer/index.ts +++ b/packages/vite/src/node/optimizer/index.ts @@ -138,7 +138,7 @@ export interface DepOptimizationConfig { * When enabled, it will hold the first optimized deps results until all static * imports are crawled on cold start. This avoids the need for full-page reloads * when new dependencies are discovered and they trigger the generation of new - * common chunks. If all dependencies are found by the scanner plus the explicitely + * common chunks. If all dependencies are found by the scanner plus the explicitly * defined ones in `include`, it is better to disable this option to let the * browser process more requests in parallel. * @default true @@ -523,7 +523,7 @@ export function runOptimizeDeps( ) } // Ignore clean up requests after this point so the temp folder isn't deleted before - // we finish commiting the new deps cache files to the deps folder + // we finish committing the new deps cache files to the deps folder committed = true // Write metadata file, then commit the processing folder to the global deps cache diff --git a/packages/vite/src/node/server/index.ts b/packages/vite/src/node/server/index.ts index 9b24de6ede4e2f..de4f75ad42d246 100644 --- a/packages/vite/src/node/server/index.ts +++ b/packages/vite/src/node/server/index.ts @@ -1124,7 +1124,7 @@ async function restartServer(server: ViteDevServer) { } // Reinit the server by creating a new instance using the same inlineConfig - // This will triger a reload of the config file and re-create the plugins and + // This will trigger a reload of the config file and re-create the plugins and // middlewares. We then assign all properties of the new server to the existing // server instance and set the user instance to be used in the new server. // This allows us to keep the same server instance for the user.