diff --git a/e2e/watch/restart.test.ts b/e2e/watch/restart.test.ts index 1831e2d9..5f00611d 100644 --- a/e2e/watch/restart.test.ts +++ b/e2e/watch/restart.test.ts @@ -49,5 +49,5 @@ export default defineConfig({}); expect(cli.stdout).toMatch('Tests 1 passed'); cli.exec.kill(); - }); + }, 15_000); }); diff --git a/packages/core/src/core/plugins/entry.ts b/packages/core/src/core/plugins/entry.ts index e69a305c..99de64a9 100644 --- a/packages/core/src/core/plugins/entry.ts +++ b/packages/core/src/core/plugins/entry.ts @@ -71,6 +71,9 @@ export const pluginEntryWatch: (params: { '**/*.snap', ); + config.experiments ??= {}; + config.experiments.nativeWatcher = true; + const configFilePath = context.projects.find( (project) => project.environmentName === environment.name, )?.configFilePath; diff --git a/packages/core/tests/core/__snapshots__/rsbuild.test.ts.snap b/packages/core/tests/core/__snapshots__/rsbuild.test.ts.snap index 01ba5193..ca1218d6 100644 --- a/packages/core/tests/core/__snapshots__/rsbuild.test.ts.snap +++ b/packages/core/tests/core/__snapshots__/rsbuild.test.ts.snap @@ -1642,6 +1642,7 @@ exports[`prepareRsbuild > should generate rspack config correctly in watch mode "asyncWebAssembly": true, "inlineConst": false, "inlineEnum": false, + "nativeWatcher": true, "rspackFuture": { "bundlerInfo": { "force": false,