diff --git a/packages/schema/package.json b/packages/schema/package.json index 2d06404dea..88958c1069 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -44,6 +44,7 @@ "@vue/compiler-sfc": "3.5.13", "@vue/language-core": "2.2.0", "c12": "2.0.1", + "chokidar": "4.0.3", "compatx": "0.1.8", "esbuild-loader": "4.2.2", "file-loader": "6.2.0", diff --git a/packages/schema/src/config/common.ts b/packages/schema/src/config/common.ts index 59848e08dc..932323af01 100644 --- a/packages/schema/src/config/common.ts +++ b/packages/schema/src/config/common.ts @@ -519,6 +519,7 @@ export default defineUntypedSchema({ /** * Options to pass directly to `chokidar`. * @see [chokidar](https://github.com/paulmillr/chokidar#api) + * @type {typeof import('chokidar').ChokidarOptions} */ chokidar: { ignoreInitial: true, diff --git a/packages/vite/src/vite.ts b/packages/vite/src/vite.ts index d0a9325f8c..ff7ab2aa06 100644 --- a/packages/vite/src/vite.ts +++ b/packages/vite/src/vite.ts @@ -88,6 +88,7 @@ export const bundle: NuxtBuilder['bundle'] = async (nuxt) => { }, }, watch: { + chokidar: nuxt.options.watchers.chokidar, exclude: nuxt.options.ignore, }, }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 34952c56b4..6010f0ff11 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -690,6 +690,9 @@ importers: c12: specifier: 2.0.1 version: 2.0.1(magicast@0.3.5) + chokidar: + specifier: ^4.0.3 + version: 4.0.3 compatx: specifier: 0.1.8 version: 0.1.8