@rsbuild/core 0.5.2 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,7 +39,7 @@ const applyServerOptions = (command) => {
39
39
  command.option("-o --open [url]", "open the page in browser on startup").option("--port <port>", "specify a port number for server to listen").option("--host <host>", "specify the host that the server listens to");
40
40
  };
41
41
  function runCli() {
42
- import_commander.program.name("rsbuild").usage("<command> [options]").version("0.5.2");
42
+ import_commander.program.name("rsbuild").usage("<command> [options]").version("0.5.4");
43
43
  const devCommand = import_commander.program.command("dev");
44
44
  const buildCommand = import_commander.program.command("build");
45
45
  const previewCommand = import_commander.program.command("preview");
@@ -34,7 +34,7 @@ function prepareCli() {
34
34
  if (!npm_execpath || npm_execpath.includes("npx-cli.js") || npm_execpath.includes(".bun")) {
35
35
  console.log();
36
36
  }
37
- import_rslog.logger.greet(` ${`Rsbuild v${"0.5.2"}`}
37
+ import_rslog.logger.greet(` ${`Rsbuild v${"0.5.4"}`}
38
38
  `);
39
39
  }
40
40
  // Annotate the CommonJS export names for ESM import in node:
package/dist/index.js CHANGED
@@ -38,7 +38,7 @@ var import_config = require("./config");
38
38
  var import_shared = require("@rsbuild/shared");
39
39
  var import_mergeConfig = require("./mergeConfig");
40
40
  var import_constants = require("./constants");
41
- const version = "0.5.2";
41
+ const version = "0.5.4";
42
42
  // Annotate the CommonJS export names for ESM import in node:
43
43
  0 && (module.exports = {
44
44
  PLUGIN_CSS_NAME,
@@ -98,6 +98,18 @@ function pluginModuleFederation() {
98
98
  return {
99
99
  name: "rsbuild:module-federation",
100
100
  setup(api) {
101
+ api.modifyRsbuildConfig({
102
+ order: "post",
103
+ handler: (config) => {
104
+ if (config.moduleFederation?.options && config.performance?.chunkSplit?.strategy === "split-by-experience") {
105
+ config.performance.chunkSplit = {
106
+ ...config.performance.chunkSplit,
107
+ strategy: "custom"
108
+ };
109
+ }
110
+ return config;
111
+ }
112
+ });
101
113
  api.modifyBundlerChain(async (chain, { CHAIN_ID, target }) => {
102
114
  const config = api.getNormalizedConfig();
103
115
  if (!config.moduleFederation?.options || target !== "web") {
@@ -211,10 +211,7 @@ const pluginSplitChunks = () => ({
211
211
  chunkSplit.forceSplitting
212
212
  );
213
213
  }
214
- const override = chunkSplit.strategy === "custom" ? (
215
- // `chunkSplit.splitChunks` compat for Eden
216
- chunkSplit.splitChunks ?? chunkSplit.override
217
- ) : chunkSplit.override;
214
+ const override = chunkSplit.strategy === "custom" ? chunkSplit.splitChunks ?? chunkSplit.override : chunkSplit.override;
218
215
  const splitChunksOptions = await SPLIT_STRATEGY_DISPATCHER[chunkSplit.strategy || "split-by-experience"]({
219
216
  defaultConfig,
220
217
  override: override || {},
@@ -44,7 +44,7 @@ async function createContextByConfig(options, bundlerType, config = {}) {
44
44
  const context = {
45
45
  entry: (0, import_entry.getEntryObject)(config, "web"),
46
46
  targets: config.output?.targets || [],
47
- version: "0.5.2",
47
+ version: "0.5.4",
48
48
  rootPath,
49
49
  distPath,
50
50
  cachePath,
@@ -79,7 +79,11 @@ const rspackProvider = async ({
79
79
  const { createDevServer } = await Promise.resolve().then(() => __toESM(require("../server/devServer")));
80
80
  const { createDevMiddleware } = await Promise.resolve().then(() => __toESM(require("./createCompiler")));
81
81
  await (0, import_initConfigs.initRsbuildConfig)({ context, pluginManager });
82
- const server = await createDevServer({ context, pluginManager, rsbuildOptions }, createDevMiddleware, options);
82
+ const server = await createDevServer(
83
+ { context, pluginManager, rsbuildOptions },
84
+ createDevMiddleware,
85
+ options
86
+ );
83
87
  return server.listen();
84
88
  },
85
89
  async preview(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/core",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "description": "The Rspack-based build tool.",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "bugs": {
@@ -52,17 +52,17 @@
52
52
  "types.d.ts"
53
53
  ],
54
54
  "dependencies": {
55
- "@rspack/core": "0.5.8",
55
+ "@rspack/core": "0.5.9",
56
56
  "@swc/helpers": "0.5.3",
57
57
  "core-js": "~3.36.0",
58
58
  "html-webpack-plugin": "npm:html-rspack-plugin@5.6.2",
59
- "postcss": "^8.4.33",
60
- "@rsbuild/shared": "0.5.2"
59
+ "postcss": "^8.4.38",
60
+ "@rsbuild/shared": "0.5.4"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@types/node": "16.x",
64
64
  "typescript": "^5.4.2",
65
- "webpack": "^5.89.0"
65
+ "webpack": "^5.91.0"
66
66
  },
67
67
  "engines": {
68
68
  "node": ">=16.0.0"