@rsbuild/core 1.1.11 → 1.1.12

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.
package/dist/index.cjs CHANGED
@@ -2741,7 +2741,7 @@ var __webpack_exports__ = {};
2741
2741
  async function createContext(options, userConfig, bundlerType) {
2742
2742
  let { cwd } = options, rootPath = userConfig.root ? getAbsolutePath(cwd, userConfig.root) : cwd, rsbuildConfig = await withDefaultConfig(rootPath, userConfig), cachePath = (0, external_node_path_.join)(rootPath, 'node_modules', '.cache');
2743
2743
  return {
2744
- version: "1.1.11",
2744
+ version: "1.1.12",
2745
2745
  rootPath,
2746
2746
  distPath: '',
2747
2747
  cachePath,
@@ -4639,20 +4639,16 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
4639
4639
  });
4640
4640
  }
4641
4641
  };
4642
- api.onAfterStartDevServer(onStartServer), api.onAfterStartProdServer(onStartServer), api.onBeforeBuild(async ({ isFirstCompile, environments })=>{
4642
+ api.onAfterStartDevServer(onStartServer), api.onAfterStartProdServer(onStartServer), api.onBeforeBuild(async ({ isFirstCompile })=>{
4643
4643
  if (!!isFirstCompile) for (let publicDir of normalizePublicDirs(api.getNormalizedConfig().server.publicDir)){
4644
4644
  let { name, copyOnBuild } = publicDir;
4645
4645
  if (!copyOnBuild || !name) continue;
4646
4646
  let normalizedPath = (0, external_node_path_.isAbsolute)(name) ? name : (0, external_node_path_.join)(api.context.rootPath, name);
4647
- if (!external_node_fs_default().existsSync(normalizedPath)) continue;
4648
- let distPaths = [
4649
- ...new Set(Object.values(environments).map((e)=>e.distPath))
4650
- ];
4651
- try {
4652
- await Promise.all(distPaths.map((distPath)=>external_node_fs_default().promises.cp(normalizedPath, distPath, {
4653
- recursive: !0,
4654
- dereference: !0
4655
- })));
4647
+ if (!!external_node_fs_default().existsSync(normalizedPath)) try {
4648
+ await external_node_fs_default().promises.cp(normalizedPath, api.context.distPath, {
4649
+ recursive: !0,
4650
+ dereference: !0
4651
+ });
4656
4652
  } catch (err) {
4657
4653
  throw err instanceof Error && (err.message = `Copy public dir (${normalizedPath}) to dist failed:\n${err.message}`), err;
4658
4654
  }
@@ -7076,11 +7072,11 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
7076
7072
  }
7077
7073
  }(), process.title = 'rsbuild-node';
7078
7074
  let { npm_execpath } = process.env;
7079
- (!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), rslog_index_js_namespaceObject.logger.greet(` Rsbuild v1.1.11\n`);
7075
+ (!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), rslog_index_js_namespaceObject.logger.greet(` Rsbuild v1.1.12\n`);
7080
7076
  }();
7081
7077
  try {
7082
7078
  !function() {
7083
- program.name('rsbuild').usage('<command> [options]').version("1.1.11");
7079
+ program.name('rsbuild').usage('<command> [options]').version("1.1.12");
7084
7080
  let devCommand = program.command('dev'), buildCommand = program.command('build'), previewCommand = program.command('preview'), inspectCommand = program.command('inspect');
7085
7081
  [
7086
7082
  devCommand,
@@ -7139,7 +7135,7 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
7139
7135
  rslog_index_js_namespaceObject.logger.error('Failed to start Rsbuild CLI.'), rslog_index_js_namespaceObject.logger.error(err);
7140
7136
  }
7141
7137
  }
7142
- let src_rslib_entry_version = "1.1.11";
7138
+ let src_rslib_entry_version = "1.1.12";
7143
7139
  })();
7144
7140
  var __webpack_export_target__ = exports;
7145
7141
  for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
package/dist/index.js CHANGED
@@ -2647,7 +2647,7 @@ async function updateEnvironmentContext(context, configs) {
2647
2647
  async function createContext(options, userConfig, bundlerType) {
2648
2648
  let { cwd } = options, rootPath = userConfig.root ? getAbsolutePath(cwd, userConfig.root) : cwd, rsbuildConfig = await withDefaultConfig(rootPath, userConfig), cachePath = (0, external_node_path_.join)(rootPath, 'node_modules', '.cache');
2649
2649
  return {
2650
- version: "1.1.11",
2650
+ version: "1.1.12",
2651
2651
  rootPath,
2652
2652
  distPath: '',
2653
2653
  cachePath,
@@ -4535,20 +4535,16 @@ let resourceHints_generateLinks = (options, rel)=>options.map((option)=>({
4535
4535
  });
4536
4536
  }
4537
4537
  };
4538
- api.onAfterStartDevServer(onStartServer), api.onAfterStartProdServer(onStartServer), api.onBeforeBuild(async ({ isFirstCompile, environments })=>{
4538
+ api.onAfterStartDevServer(onStartServer), api.onAfterStartProdServer(onStartServer), api.onBeforeBuild(async ({ isFirstCompile })=>{
4539
4539
  if (!!isFirstCompile) for (let publicDir of normalizePublicDirs(api.getNormalizedConfig().server.publicDir)){
4540
4540
  let { name, copyOnBuild } = publicDir;
4541
4541
  if (!copyOnBuild || !name) continue;
4542
4542
  let normalizedPath = (0, external_node_path_.isAbsolute)(name) ? name : (0, external_node_path_.join)(api.context.rootPath, name);
4543
- if (!external_node_fs_.default.existsSync(normalizedPath)) continue;
4544
- let distPaths = [
4545
- ...new Set(Object.values(environments).map((e)=>e.distPath))
4546
- ];
4547
- try {
4548
- await Promise.all(distPaths.map((distPath)=>external_node_fs_.default.promises.cp(normalizedPath, distPath, {
4549
- recursive: !0,
4550
- dereference: !0
4551
- })));
4543
+ if (!!external_node_fs_.default.existsSync(normalizedPath)) try {
4544
+ await external_node_fs_.default.promises.cp(normalizedPath, api.context.distPath, {
4545
+ recursive: !0,
4546
+ dereference: !0
4547
+ });
4552
4548
  } catch (err) {
4553
4549
  throw err instanceof Error && (err.message = `Copy public dir (${normalizedPath}) to dist failed:\n${err.message}`), err;
4554
4550
  }
@@ -6963,11 +6959,11 @@ async function runCLI() {
6963
6959
  }
6964
6960
  }(), process.title = 'rsbuild-node';
6965
6961
  let { npm_execpath } = process.env;
6966
- (!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js__.logger.greet(` Rsbuild v1.1.11\n`);
6962
+ (!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js__.logger.greet(` Rsbuild v1.1.12\n`);
6967
6963
  }();
6968
6964
  try {
6969
6965
  !function() {
6970
- program.name('rsbuild').usage('<command> [options]').version("1.1.11");
6966
+ program.name('rsbuild').usage('<command> [options]').version("1.1.12");
6971
6967
  let devCommand = program.command('dev'), buildCommand = program.command('build'), previewCommand = program.command('preview'), inspectCommand = program.command('inspect');
6972
6968
  [
6973
6969
  devCommand,
@@ -7026,6 +7022,6 @@ async function runCLI() {
7026
7022
  __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js__.logger.error('Failed to start Rsbuild CLI.'), __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js__.logger.error(err);
7027
7023
  }
7028
7024
  }
7029
- let src_version = "1.1.11";
7025
+ let src_version = "1.1.12";
7030
7026
  var __webpack_exports__logger = __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js__.logger, __webpack_exports__rspack = __WEBPACK_EXTERNAL_MODULE__rspack_core__.rspack;
7031
7027
  export { PLUGIN_CSS_NAME, PLUGIN_SWC_NAME, internal_namespaceObject as __internalHelper, createRsbuild, defineConfig, ensureAssetPrefix, config_loadConfig as loadConfig, loadEnv, mergeRsbuildConfig, runCLI, src_version as version, __webpack_exports__logger as logger, __webpack_exports__rspack as rspack };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/core",
3
- "version": "1.1.11",
3
+ "version": "1.1.12",
4
4
  "description": "The Rspack-based build tool.",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "bugs": {