Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: compat rspack 0.4.0 #4953

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 7 additions & 0 deletions .changeset/modern-fans-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@modern-js/builder-rspack-provider': patch
---

chore(rspack-provider): set disableTransformByDefault false to compat rspack next version(0.4.0)

chore(rspack-provider): 设置 disableTransformByDefault 为 false 以兼容 Rspack next(0.4.0) 版本
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { BuilderPlugin } from '../types';

import { setConfig } from '@modern-js/builder-shared';
/**
* Provide some temporary configurations for Rspack early transition
*/
Expand All @@ -14,5 +14,13 @@ export const builderPluginTransition = (): BuilderPlugin => ({
chain.optimization.chunkIds('deterministic');
}
});

api.modifyRspackConfig(config => {
setConfig(
config,
'experiments.rspackFuture.disableTransformByDefault',
false,
);
});
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = `
"devtool": "cheap-module-source-map",
"experiments": {
"asyncWebAssembly": true,
"rspackFuture": {
"disableTransformByDefault": false,
},
},
"infrastructureLogging": {
"level": "error",
Expand Down Expand Up @@ -781,6 +784,9 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when prod
"devtool": "hidden-source-map",
"experiments": {
"asyncWebAssembly": true,
"rspackFuture": {
"disableTransformByDefault": false,
},
},
"infrastructureLogging": {
"level": "error",
Expand Down Expand Up @@ -1552,6 +1558,9 @@ exports[`applyDefaultPlugins > should apply default plugins correctyly when targ
"devtool": "cheap-module-source-map",
"experiments": {
"asyncWebAssembly": true,
"rspackFuture": {
"disableTransformByDefault": false,
},
},
"infrastructureLogging": {
"level": "error",
Expand Down Expand Up @@ -2017,6 +2026,9 @@ exports[`tools.rspack > should match snapshot 1`] = `
"devtool": "cheap-module-source-map",
"experiments": {
"asyncWebAssembly": true,
"rspackFuture": {
"disableTransformByDefault": false,
},
},
"infrastructureLogging": {
"level": "error",
Expand Down
Loading