Skip to content

Commit

Permalink
chore: remove unused config for Rspack 0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan committed Jan 9, 2024
1 parent a467188 commit b57dc22
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 36 deletions.
17 changes: 1 addition & 16 deletions packages/core/src/provider/plugins/transition.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { setConfig } from '@rsbuild/shared';
import type { RsbuildPlugin } from '../../types';

/**
Expand All @@ -7,21 +6,7 @@ import type { RsbuildPlugin } from '../../types';
export const pluginTransition = (): RsbuildPlugin => ({
name: 'rsbuild:transition',

setup(api) {
setup() {
process.env.RSPACK_CONFIG_VALIDATE = 'loose-silent';

api.modifyBundlerChain(async (chain, { isProd }) => {
if (isProd) {
chain.optimization.chunkIds('deterministic');
}
});

api.modifyRspackConfig((config) => {
setConfig(
config,
'experiments.rspackFuture.disableApplyEntryLazily',
true,
);
});
},
});
2 changes: 1 addition & 1 deletion packages/core/src/provider/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const applyDefaultPlugins = (plugins: Plugins) =>
]);

// apply builtin:swc-loader
export const rspackMinVersion = '0.4.0';
export const rspackMinVersion = '0.4.5';

const compareSemver = (version1: string, version2: string) => {
const parts1 = version1.split('.').map(Number);
Expand Down
3 changes: 0 additions & 3 deletions packages/core/tests/__snapshots__/builder.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ exports[`should use rspack as default bundler > apply rspack correctly 1`] = `
},
"experiments": {
"asyncWebAssembly": true,
"rspackFuture": {
"disableApplyEntryLazily": true,
},
},
"infrastructureLogging": {
"level": "error",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = `
},
"experiments": {
"asyncWebAssembly": true,
"rspackFuture": {
"disableApplyEntryLazily": true,
},
},
"infrastructureLogging": {
"level": "error",
Expand Down Expand Up @@ -690,9 +687,6 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when prod
},
"experiments": {
"asyncWebAssembly": true,
"rspackFuture": {
"disableApplyEntryLazily": true,
},
},
"infrastructureLogging": {
"level": "error",
Expand Down Expand Up @@ -1232,7 +1226,6 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when prod
},
"name": "Client",
"optimization": {
"chunkIds": "deterministic",
"minimize": true,
"minimizer": [
SwcJsMinimizerRspackPlugin {
Expand Down Expand Up @@ -1407,9 +1400,6 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe
},
"experiments": {
"asyncWebAssembly": true,
"rspackFuture": {
"disableApplyEntryLazily": true,
},
},
"infrastructureLogging": {
"level": "error",
Expand Down Expand Up @@ -1821,9 +1811,6 @@ exports[`tools.rspack > should match snapshot 1`] = `
},
"experiments": {
"asyncWebAssembly": true,
"rspackFuture": {
"disableApplyEntryLazily": true,
},
},
"infrastructureLogging": {
"level": "error",
Expand Down
3 changes: 0 additions & 3 deletions packages/plugin-react/tests/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ exports[`plugins/react > should work with swc-loader 1`] = `
},
"experiments": {
"asyncWebAssembly": true,
"rspackFuture": {
"disableApplyEntryLazily": true,
},
},
"infrastructureLogging": {
"level": "error",
Expand Down

0 comments on commit b57dc22

Please sign in to comment.