Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "1.0.0",
"scripts": {
"e2e": "pnpm e2e:rspack && pnpm e2e:webpack",
"e2e:rspack": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" EXPERIMENTAL_RSPACK_INCREMENTAL=true playwright test",
"e2e:rspack": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" playwright test",
"e2e:webpack": "cross-env PROVIDE_TYPE=webpack playwright test"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = `
},
"experiments": {
"asyncWebAssembly": true,
"incremental": true,
},
"infrastructureLogging": {
"level": "error",
Expand Down Expand Up @@ -482,6 +483,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when produ
},
"experiments": {
"asyncWebAssembly": true,
"incremental": false,
},
"infrastructureLogging": {
"level": "error",
Expand Down Expand Up @@ -935,6 +937,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe
},
"experiments": {
"asyncWebAssembly": true,
"incremental": false,
},
"infrastructureLogging": {
"level": "error",
Expand Down Expand Up @@ -1314,6 +1317,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe
},
"experiments": {
"asyncWebAssembly": true,
"incremental": false,
},
"infrastructureLogging": {
"level": "error",
Expand Down
12 changes: 5 additions & 7 deletions packages/core/src/plugins/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,11 @@ export const pluginBasic = (): RsbuildPlugin => ({
// 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,
});
}
// TODO: we can remove it after Rspack incremental is enabled by default
chain.experiments({
...chain.get('experiments'),
incremental: isDev,
Comment thread
chenjiahan marked this conversation as resolved.
Outdated
});
},
);
},
Expand Down
6 changes: 6 additions & 0 deletions packages/core/tests/__snapshots__/basic.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ exports[`plugin-basic > should apply basic config correctly in development 1`] =
{
"context": "<ROOT>/packages/core/tests",
"devtool": "cheap-module-source-map",
"experiments": {
"incremental": true,
},
"infrastructureLogging": {
"level": "error",
},
Expand Down Expand Up @@ -42,6 +45,9 @@ exports[`plugin-basic > should apply basic config correctly in production 1`] =
{
"context": "<ROOT>/packages/core/tests",
"devtool": false,
"experiments": {
"incremental": false,
},
"infrastructureLogging": {
"level": "error",
},
Expand Down
1 change: 1 addition & 0 deletions packages/core/tests/__snapshots__/builder.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ exports[`should use Rspack as the default bundler > apply Rspack correctly 1`] =
},
"experiments": {
"asyncWebAssembly": true,
"incremental": true,
},
"infrastructureLogging": {
"level": "error",
Expand Down
4 changes: 4 additions & 0 deletions packages/core/tests/__snapshots__/default.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = `
},
"experiments": {
"asyncWebAssembly": true,
"incremental": true,
},
"infrastructureLogging": {
"level": "error",
Expand Down Expand Up @@ -492,6 +493,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when prod
},
"experiments": {
"asyncWebAssembly": true,
"incremental": false,
},
"infrastructureLogging": {
"level": "error",
Expand Down Expand Up @@ -1010,6 +1012,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe
},
"experiments": {
"asyncWebAssembly": true,
"incremental": true,
},
"infrastructureLogging": {
"level": "error",
Expand Down Expand Up @@ -1408,6 +1411,7 @@ exports[`tools.rspack > should match snapshot 1`] = `
},
"experiments": {
"asyncWebAssembly": true,
"incremental": true,
},
"infrastructureLogging": {
"level": "error",
Expand Down
2 changes: 2 additions & 0 deletions packages/core/tests/__snapshots__/environments.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1306,6 +1306,7 @@ exports[`environment config > tools.rspack / bundlerChain can be configured in e
"devtool": "eval-source-map",
"experiments": {
"asyncWebAssembly": true,
"incremental": true,
},
"infrastructureLogging": {
"level": "error",
Expand Down Expand Up @@ -1722,6 +1723,7 @@ exports[`environment config > tools.rspack / bundlerChain can be configured in e
"devtool": "eval",
"experiments": {
"asyncWebAssembly": true,
"incremental": true,
},
"infrastructureLogging": {
"level": "error",
Expand Down