Skip to content

Commit

Permalink
fix: update rspack version (#6796)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClarkXia authored Feb 20, 2024
1 parent e0b2eae commit 45bf24b
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 496 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"packageManager": "pnpm@8.9.2",
"pnpm": {
"patchedDependencies": {
"@rspack/core@0.5.1": "patches/@rspack__core@0.5.1.patch"
"@rspack/core@0.5.4": "patches/@rspack__core@0.5.4.patch"
}
}
}
8 changes: 4 additions & 4 deletions packages/bundles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@
"zod": "^3.22.3",
"zod-validation-error": "1.2.0",
"terminal-link": "^2.1.1",
"@ice/pack-binding": "0.0.9",
"@ice/pack-binding": "0.0.11",
"mime-types": "2.1.35"
},
"devDependencies": {
"@rspack/plugin-react-refresh": "0.5.1",
"@rspack/dev-server": "0.5.1",
"@rspack/core": "0.5.1",
"@rspack/plugin-react-refresh": "0.5.4",
"@rspack/dev-server": "0.5.4",
"@rspack/core": "0.5.4",
"@types/less": "^3.0.3",
"@types/lodash": "^4.14.181",
"@types/webpack-bundle-analyzer": "^4.4.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/ice/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@
"unplugin": "^1.6.0",
"webpack": "^5.88.0",
"webpack-dev-server": "4.15.0",
"@rspack/core": "0.5.1",
"@rspack/dev-server": "0.4.3"
"@rspack/core": "0.5.4",
"@rspack/dev-server": "0.5.4"
},
"peerDependencies": {
"react": ">=18.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/rspack-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@ice/shared-config": "1.2.3"
},
"devDependencies": {
"@rspack/core": "0.5.1"
"@rspack/core": "0.5.4"
},
"scripts": {
"watch": "tsc -w --sourceMap",
Expand Down
10 changes: 4 additions & 6 deletions packages/rspack-config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ interface BuiltinFeatures {
name: string;
topLevelFrameworks: string[];
};
assetsManifest?: boolean;
}

const require = createRequire(import.meta.url);
Expand Down Expand Up @@ -101,7 +102,9 @@ const getConfig: GetConfig = async (options) => {
},
module: true,
}, minimizerOptions);
const builtinFeatures: BuiltinFeatures = {};
const builtinFeatures: BuiltinFeatures = {
assetsManifest: true,
};
let splitChunksStrategy = null;
// Use builtin splitChunks strategy by default.
if (splitChunks === true || splitChunks === 'chunks') {
Expand Down Expand Up @@ -225,11 +228,6 @@ const getConfig: GetConfig = async (options) => {
modules: { localIdentName },
},
},
experiments: {
rspackFuture: {
newTreeshaking: true,
},
},
stats: 'none',
infrastructureLogging: {
level: 'warn',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/dist/config/adapter.js b/dist/config/adapter.js
index 021b79b64d88a89baca5eebae5376e3c84438d96..ed00bf266a3c8f9a54baf40a2b03b500d88f2894 100644
index 49122b3e9f4f0ac85b4075a98f693986b4333051..c3436a090fdbac00e555b2e308974f8d3f9c2426 100644
--- a/dist/config/adapter.js
+++ b/dist/config/adapter.js
@@ -15,6 +15,7 @@ const getRawOptions = (options, compiler) => {
Expand All @@ -11,7 +11,7 @@ index 021b79b64d88a89baca5eebae5376e3c84438d96..ed00bf266a3c8f9a54baf40a2b03b500
target: getRawTarget(options.target),
context: options.context,
diff --git a/dist/config/defaults.js b/dist/config/defaults.js
index 98126c146a2e38b407170113b82d070ac25c3371..464ed60cf455c6ff1be7a11061974353770346c2 100644
index aeb7b74dd8473fa049002cf710ae860577d6d2e2..0dd4fd09fd08482b5a2c5a82cad61ab70e2b2d68 100644
--- a/dist/config/defaults.js
+++ b/dist/config/defaults.js
@@ -53,6 +53,11 @@ const applyRspackOptionsDefaults = (options) => {
Expand All @@ -26,9 +26,9 @@ index 98126c146a2e38b407170113b82d070ac25c3371..464ed60cf455c6ff1be7a11061974353
applySnapshotDefaults(options.snapshot, { production });
applyModuleDefaults(options.module, {
// syncWebAssembly: options.experiments.syncWebAssembly,
@@ -115,6 +120,13 @@ const applyExperimentsDefaults = (experiments, { cache }) => {
D(experiments.rspackFuture, "disableApplyEntryLazily", true);
}
@@ -103,6 +108,13 @@ const applyInfrastructureLoggingDefaults = (infrastructureLogging) => {
D(infrastructureLogging, "colors", tty);
D(infrastructureLogging, "appendOnly", !tty);
};
+const applyFeaturesDefaults = (features) => {
+ D(features, 'split_chunks_strategy', {});
Expand All @@ -37,11 +37,11 @@ index 98126c146a2e38b407170113b82d070ac25c3371..464ed60cf455c6ff1be7a11061974353
+ D(features.split_chunks_strategy, 'topLevelFrameworks', []);
+ }
+};
const applySnapshotDefaults = (snapshot, { production }) => {
F(snapshot, "module", () => production
? { timestamp: true, hash: true }
const applyExperimentsDefaults = (experiments, { cache }) => {
D(experiments, "lazyCompilation", false);
D(experiments, "asyncWebAssembly", false);
diff --git a/dist/config/normalization.js b/dist/config/normalization.js
index e13db5ae3115aa455954784fe48be4145b94e05b..f9a53cb50c2becf65ba3233ec7dee9581d0a630a 100644
index 72167c504bd43f606481ccd1de0bdcb9eae71d9f..b16f9f3bbf1c45e00a9ca31684cefec55198683b 100644
--- a/dist/config/normalization.js
+++ b/dist/config/normalization.js
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
Expand All @@ -53,14 +53,15 @@ index e13db5ae3115aa455954784fe48be4145b94e05b..f9a53cb50c2becf65ba3233ec7dee958
? config.ignoreWarnings.map(ignore => {
if (typeof ignore === "function") {
diff --git a/dist/config/zod.js b/dist/config/zod.js
index ae3c80c1e17b66c6ceeff02e06ee9d119c795d67..0c07c2044f81ec6b322fcf201ceab1fde4926187 100644
index 1c4c2cf4d02c562b8fc965c103de0eaf8e246b6a..7fa7e42a02180081096d77f64d7df0cc7d61b4d1 100644
--- a/dist/config/zod.js
+++ b/dist/config/zod.js
@@ -747,5 +747,6 @@ exports.rspackOptions = zod_1.z.strictObject({
@@ -766,6 +766,7 @@ exports.rspackOptions = zod_1.z.strictObject({
builtins: builtins.optional(),
module: moduleOptions.optional(),
profile: profile.optional(),
- bail: bail.optional()
+ bail: bail.optional(),
+ features: zod_1.z.custom().optional(),
});
//# sourceMappingURL=zod.js.map
Loading

0 comments on commit 45bf24b

Please sign in to comment.