@rsbuild/core 2.0.0-alpha.1 → 2.0.0-alpha.2

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.
@@ -1,8 +1,8 @@
1
1
  (() => {
2
2
  var __webpack_modules__ = {
3
- 992: (module, __unused_webpack_exports, __nccwpck_require__) => {
3
+ 633: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
4
  "use strict";
5
- const { HtmlWebpackChildCompiler } = __nccwpck_require__(381);
5
+ const { HtmlWebpackChildCompiler } = __nccwpck_require__(906);
6
6
  const compilerMap = new WeakMap();
7
7
  class CachedChildCompilation {
8
8
  constructor(compiler) {
@@ -311,7 +311,7 @@
311
311
  }
312
312
  module.exports = { CachedChildCompilation };
313
313
  },
314
- 381: (module) => {
314
+ 906: (module) => {
315
315
  "use strict";
316
316
  class HtmlWebpackChildCompiler {
317
317
  constructor(templates) {
@@ -480,7 +480,7 @@
480
480
  }
481
481
  module.exports = { HtmlWebpackChildCompiler };
482
482
  },
483
- 3: (module) => {
483
+ 930: (module) => {
484
484
  "use strict";
485
485
  module.exports = {};
486
486
  module.exports.none = (chunks) => chunks;
@@ -499,7 +499,7 @@
499
499
  };
500
500
  module.exports.auto = module.exports.none;
501
501
  },
502
- 438: (module) => {
502
+ 525: (module) => {
503
503
  "use strict";
504
504
  module.exports = function (err) {
505
505
  return {
@@ -520,7 +520,7 @@
520
520
  };
521
521
  };
522
522
  },
523
- 573: (module, __unused_webpack_exports, __nccwpck_require__) => {
523
+ 516: (module, __unused_webpack_exports, __nccwpck_require__) => {
524
524
  "use strict";
525
525
  const { AsyncSeriesWaterfallHook } = __nccwpck_require__(408);
526
526
  const htmlWebpackPluginHooksMap = new WeakMap();
@@ -546,7 +546,7 @@
546
546
  }
547
547
  module.exports = { getHtmlRspackPluginHooks };
548
548
  },
549
- 956: (module) => {
549
+ 153: (module) => {
550
550
  const voidTags = [
551
551
  "area",
552
552
  "base",
@@ -614,19 +614,19 @@
614
614
  htmlTagObjectToString,
615
615
  };
616
616
  },
617
- 249: (module, __unused_webpack_exports, __nccwpck_require__) => {
617
+ 12: (module, __unused_webpack_exports, __nccwpck_require__) => {
618
618
  "use strict";
619
619
  const promisify = __nccwpck_require__(23).promisify;
620
620
  const vm = __nccwpck_require__(154);
621
621
  const fs = __nccwpck_require__(896);
622
622
  const path = __nccwpck_require__(928);
623
- const { CachedChildCompilation } = __nccwpck_require__(992);
623
+ const { CachedChildCompilation } = __nccwpck_require__(633);
624
624
  const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } =
625
- __nccwpck_require__(956);
626
- const prettyError = __nccwpck_require__(438);
627
- const chunkSorter = __nccwpck_require__(3);
625
+ __nccwpck_require__(153);
626
+ const prettyError = __nccwpck_require__(525);
627
+ const chunkSorter = __nccwpck_require__(930);
628
628
  const getHtmlRspackPluginHooks =
629
- __nccwpck_require__(573).getHtmlRspackPluginHooks;
629
+ __nccwpck_require__(516).getHtmlRspackPluginHooks;
630
630
  const WITH_PLACEHOLDER = "function __with_placeholder__";
631
631
  class HtmlRspackPlugin {
632
632
  constructor(userOptions = {}) {
@@ -1597,6 +1597,6 @@
1597
1597
  }
1598
1598
  if (typeof __nccwpck_require__ !== "undefined")
1599
1599
  __nccwpck_require__.ab = __dirname + "/";
1600
- var __webpack_exports__ = __nccwpck_require__(249);
1600
+ var __webpack_exports__ = __nccwpck_require__(12);
1601
1601
  module.exports = __webpack_exports__;
1602
1602
  })();
@@ -1,15 +1,15 @@
1
1
  (() => {
2
2
  "use strict";
3
3
  var __webpack_modules__ = {
4
- 396: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
- module.exports = __nccwpck_require__(586)["default"];
4
+ 791: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
+ module.exports = __nccwpck_require__(601)["default"];
6
6
  },
7
- 586: (__unused_webpack_module, exports, __nccwpck_require__) => {
7
+ 601: (__unused_webpack_module, exports, __nccwpck_require__) => {
8
8
  var __webpack_unused_export__;
9
9
  __webpack_unused_export__ = { value: true };
10
10
  exports["default"] = loader;
11
11
  var _nodePath = _interopRequireDefault(__nccwpck_require__(760));
12
- var _utils = __nccwpck_require__(179);
12
+ var _utils = __nccwpck_require__(980);
13
13
  function _interopRequireDefault(e) {
14
14
  return e && e.__esModule ? e : { default: e };
15
15
  }
@@ -179,7 +179,7 @@
179
179
  callback(null, result.css, map, { ast });
180
180
  }
181
181
  },
182
- 179: (module, exports, __nccwpck_require__) => {
182
+ 980: (module, exports, __nccwpck_require__) => {
183
183
  module = __nccwpck_require__.nmd(module);
184
184
  Object.defineProperty(exports, "__esModule", { value: true });
185
185
  exports.exec = exec;
@@ -715,6 +715,6 @@
715
715
  })();
716
716
  if (typeof __nccwpck_require__ !== "undefined")
717
717
  __nccwpck_require__.ab = __dirname + "/";
718
- var __webpack_exports__ = __nccwpck_require__(396);
718
+ var __webpack_exports__ = __nccwpck_require__(791);
719
719
  module.exports = __webpack_exports__;
720
720
  })();
@@ -1 +1 @@
1
- {"name":"rslog","version":"1.3.2","license":"MIT","types":"index.d.ts","type":"commonjs"}
1
+ {"name":"rslog","version":"1.3.2","license":"MIT","types":"index.d.ts","type":"module"}
@@ -1 +1 @@
1
- {"name":"rspack-chain","version":"2.0.0-alpha.0","license":"MIT","types":"types/index.d.ts","type":"module"}
1
+ {"name":"rspack-chain","version":"2.0.0-alpha.0","license":"MIT","types":"types/index.d.ts","type":"module"}
package/dist/131.js CHANGED
@@ -15,7 +15,7 @@ import * as __rspack_external_path from "path";
15
15
  import * as __rspack_external_url from "url";
16
16
  import { __webpack_require__ } from "./rslib-runtime.js";
17
17
  import node_process from "node:process";
18
- import node_os, { constants as external_node_os_constants } from "node:os";
18
+ import node_os, { constants as external_node_os_constants, type as external_node_os_type } from "node:os";
19
19
  import node_tty from "node:tty";
20
20
  import { promisify as external_node_util_promisify, stripVTControlCharacters } from "node:util";
21
21
  import { isPromise, isRegExp } from "node:util/types";
@@ -3446,7 +3446,7 @@ function createPublicContext(context) {
3446
3446
  async function createContext(options, userConfig) {
3447
3447
  let { cwd } = options, rootPath = userConfig.root ? ensureAbsolutePath(cwd, userConfig.root) : cwd, rsbuildConfig = await withDefaultConfig(rootPath, userConfig), cachePath = (0, external_node_path_.join)(rootPath, 'node_modules', '.cache'), specifiedEnvironments = options.environment && options.environment.length > 0 ? options.environment : void 0;
3448
3448
  return {
3449
- version: "2.0.0-alpha.1",
3449
+ version: "2.0.0-alpha.2",
3450
3450
  rootPath,
3451
3451
  distPath: '',
3452
3452
  cachePath,
@@ -7214,7 +7214,9 @@ function prepareWatchOptions(paths, options = {}, type) {
7214
7214
  }
7215
7215
  let GLOB_REGEX = /[*?{}[\]()!+|]/;
7216
7216
  async function createChokidar(pathOrGlobs, root, options) {
7217
- let chokidar = requireCompiledPackage('chokidar'), watchFiles = new Set(), globPatterns = pathOrGlobs.filter((pathOrGlob)=>!!GLOB_REGEX.test(pathOrGlob) || (watchFiles.add(pathOrGlob), !1));
7217
+ let { default: chokidar } = await import("./chokidar.js").then((mod)=>({
7218
+ default: mod.chokidar
7219
+ })), watchFiles = new Set(), globPatterns = pathOrGlobs.filter((pathOrGlob)=>!!GLOB_REGEX.test(pathOrGlob) || (watchFiles.add(pathOrGlob), !1));
7218
7220
  if (globPatterns.length) {
7219
7221
  let { glob } = await import("./tinyglobby.js").then((mod)=>({
7220
7222
  glob: mod.glob
@@ -8583,7 +8585,7 @@ try {
8583
8585
  api.modifyBundlerChain(async (chain, { CHAIN_ID, environment, isDev })=>{
8584
8586
  let { output: { manifest }, dev: { writeToDisk } } = environment.config;
8585
8587
  if (!1 === manifest) return;
8586
- let manifestOptions = normalizeManifestObjectConfig(manifest), { RspackManifestPlugin } = await import("./manifest-plugin.js").then(__webpack_require__.bind(__webpack_require__, "../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.0-canary.20260120_@module-federation+runt_861eb0fd4793784f895b612a1bbe4031/node_modules/rspack-manifest-plugin/dist/index.js")), { htmlPaths } = environment, filter = manifestOptions.filter ?? ((file)=>!file.name.endsWith('.LICENSE.txt'));
8588
+ let manifestOptions = normalizeManifestObjectConfig(manifest), { RspackManifestPlugin } = await import("./manifest-plugin.js").then(__webpack_require__.bind(__webpack_require__, "../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.0-alpha.0_@module-federation+runtime-tools@0.22.1_@swc+helpers@0.5.18_/node_modules/rspack-manifest-plugin/dist/index.js")), { htmlPaths } = environment, filter = manifestOptions.filter ?? ((file)=>!file.name.endsWith('.LICENSE.txt'));
8587
8589
  manifestFilenames.set(environment.name, manifestOptions.filename);
8588
8590
  let pluginOptions = {
8589
8591
  fileName: manifestOptions.filename,
@@ -9092,7 +9094,7 @@ let applyServerOptions = (command)=>{
9092
9094
  };
9093
9095
  function setupCommands() {
9094
9096
  let cli = ((name = "")=>new CAC(name))('rsbuild');
9095
- cli.version("2.0.0-alpha.1"), cli.option('--base <base>', 'Set the base path of the server').option('-c, --config <config>', 'Set the configuration file (relative or absolute path)').option('--config-loader <loader>', 'Set the config file loader (auto | jiti | native)', {
9097
+ cli.version("2.0.0-alpha.2"), cli.option('--base <base>', 'Set the base path of the server').option('-c, --config <config>', 'Set the configuration file (relative or absolute path)').option('--config-loader <loader>', 'Set the config file loader (auto | jiti | native)', {
9096
9098
  default: 'auto'
9097
9099
  }).option('--env-dir <dir>', 'Set the directory for loading `.env` files').option('--env-mode <mode>', 'Set the env mode to load the `.env.[mode]` file').option('--environment <name>', 'Set the environment name(s) to build', {
9098
9100
  type: [
@@ -9161,7 +9163,7 @@ function initNodeEnv() {
9161
9163
  }
9162
9164
  function showGreeting() {
9163
9165
  let { npm_execpath, npm_lifecycle_event, NODE_RUN_SCRIPT_NAME } = process.env, isBun = npm_execpath?.includes('.bun');
9164
- src_logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v2.0.0-alpha.1\n`);
9166
+ src_logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v2.0.0-alpha.2\n`);
9165
9167
  }
9166
9168
  function setupLogLevel() {
9167
9169
  let logLevelIndex = process.argv.findIndex((item)=>'--log-level' === item || '--logLevel' === item);
@@ -9179,8 +9181,8 @@ function runCLI() {
9179
9181
  try {
9180
9182
  setupCommands();
9181
9183
  } catch (err) {
9182
- src_logger.error('Failed to start Rsbuild CLI.'), src_logger.error(err);
9184
+ src_logger.error('Failed to start Rsbuild CLI.'), src_logger.error(err), process.exit(1);
9183
9185
  }
9184
9186
  }
9185
- let src_version = "2.0.0-alpha.1";
9186
- export { PLUGIN_CSS_NAME, PLUGIN_SWC_NAME, createRsbuild, defaultAllowedOrigins, defineConfig, ensureAssetPrefix, external_node_util_promisify, loadConfig_loadConfig as loadConfig, loadEnv, mergeRsbuildConfig, node_os, node_process, rspack_rspack as rspack, runCLI, src_logger as logger, src_version as version };
9187
+ let src_version = "2.0.0-alpha.2";
9188
+ export { PLUGIN_CSS_NAME, PLUGIN_SWC_NAME, createRsbuild, defaultAllowedOrigins, defineConfig, ensureAssetPrefix, external_node_os_type, external_node_util_promisify, loadConfig_loadConfig as loadConfig, loadEnv, mergeRsbuildConfig, node_os, node_process, rspack_rspack as rspack, runCLI, src_logger as logger, src_version as version };
package/dist/397.js ADDED
@@ -0,0 +1,11 @@
1
+ import * as __rspack_external_node_events_0a6aefe7 from "node:events";
2
+ import * as __rspack_external_node_stream_444d1c2b from "node:stream";
3
+ import { __webpack_require__ } from "./rslib-runtime.js";
4
+ __webpack_require__.add({
5
+ "node:events" (module) {
6
+ module.exports = __rspack_external_node_events_0a6aefe7;
7
+ },
8
+ "node:stream" (module) {
9
+ module.exports = __rspack_external_node_stream_444d1c2b;
10
+ }
11
+ });
package/dist/7.js ADDED
@@ -0,0 +1 @@
1
+ export { constants, default as promises, lstat, open as promises_open, readdir, realpath, stat } from "node:fs/promises";