Skip to content

Commit

Permalink
test: run e2e cases with Rspack incremental (#4188)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored Dec 13, 2024
1 parent 1f4d749 commit 8577d78
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"name": "@rsbuild/e2e",
"version": "1.0.0",
"scripts": {
"test": "pnpm test:rspack && pnpm test:webpack",
"test": "pnpm test:rspack && pnpm test:rspack:incremental && pnpm test:webpack",
"test:rspack": "cross-env NODE_OPTIONS=--experimental-vm-modules playwright test",
"test:rspack:incremental": "cross-env NODE_OPTIONS=--experimental-vm-modules EXPERIMENTAL_RSPACK_INCREMENTAL=true playwright test",
"test:webpack": "cross-env PROVIDE_TYPE=webpack playwright test"
},
"dependencies": {
Expand Down
8 changes: 8 additions & 0 deletions packages/core/src/plugins/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@ export const pluginBasic = (): RsbuildPlugin => ({
// improve kill process performance
// https://github.com/web-infra-dev/rspack/pull/5486
process.env.WATCHPACK_WATCHER_LIMIT ||= '20';

// This is temporary, we will remove it after Rspack incremental is stable
if (process.env.EXPERIMENTAL_RSPACK_INCREMENTAL) {
chain.experiments({
...chain.get('experiments'),
incremental: isDev,
});
}
},
);
},
Expand Down

0 comments on commit 8577d78

Please sign in to comment.