Skip to content
3 changes: 3 additions & 0 deletions packages/core/src/core/plugins/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ export const pluginEntryWatch: (params: {
'**/*.snap',
);

config.experiments ??= {};
config.experiments.nativeWatcher = true;

const configFilePath = context.projects.find(
(project) => project.environmentName === environment.name,
)?.configFilePath;
Expand Down
3 changes: 3 additions & 0 deletions packages/core/tests/core/__snapshots__/rsbuild.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1702,6 +1702,9 @@ exports[`prepareRsbuild > should generate rspack config correctly in watch mode
"context": "<ROOT>/packages/core",
"devtool": "nosources-source-map",
"entry": [Function],
"experiments": {
"nativeWatcher": true,
},
"externals": [
[Function],
{
Expand Down
Loading