@rsbuild/webpack 0.3.6 → 0.3.7

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.
@@ -21,7 +21,7 @@ __export(inspectConfig_exports, {
21
21
  inspectConfig: () => inspectConfig
22
22
  });
23
23
  module.exports = __toCommonJS(inspectConfig_exports);
24
- var import_path = require("path");
24
+ var import_node_path = require("node:path");
25
25
  var import_initConfigs = require("./initConfigs");
26
26
  var import_shared = require("@rsbuild/shared");
27
27
  async function inspectConfig({
@@ -55,8 +55,8 @@ async function inspectConfig({
55
55
  )
56
56
  );
57
57
  let outputPath = inspectOptions.outputPath || context.distPath;
58
- if (!(0, import_path.isAbsolute)(outputPath)) {
59
- outputPath = (0, import_path.join)(context.rootPath, outputPath);
58
+ if (!(0, import_node_path.isAbsolute)(outputPath)) {
59
+ outputPath = (0, import_node_path.join)(context.rootPath, outputPath);
60
60
  }
61
61
  if (inspectOptions.writeToDisk) {
62
62
  await (0, import_shared.outputInspectConfigFiles)({
@@ -31,7 +31,7 @@ __export(copy_exports, {
31
31
  pluginCopy: () => pluginCopy
32
32
  });
33
33
  module.exports = __toCommonJS(copy_exports);
34
- var import_fs = __toESM(require("fs"));
34
+ var import_node_fs = __toESM(require("node:fs"));
35
35
  const pluginCopy = () => ({
36
36
  name: "rsbuild-webpack:copy",
37
37
  setup(api) {
@@ -51,7 +51,7 @@ const pluginCopy = () => ({
51
51
  );
52
52
  if (copyPlugin) {
53
53
  const isContextNotExists = copyPlugin.patterns.every(
54
- (pattern) => typeof pattern !== "string" && pattern.context && !import_fs.default.existsSync(pattern.context)
54
+ (pattern) => typeof pattern !== "string" && pattern.context && !import_node_fs.default.existsSync(pattern.context)
55
55
  );
56
56
  if (isContextNotExists) {
57
57
  config.plugins = config.plugins?.filter(
@@ -31,7 +31,7 @@ __export(output_exports, {
31
31
  pluginOutput: () => pluginOutput
32
32
  });
33
33
  module.exports = __toCommonJS(output_exports);
34
- var import_path = require("path");
34
+ var import_node_path = require("node:path");
35
35
  var import_shared = require("@rsbuild/shared");
36
36
  const pluginOutput = () => ({
37
37
  name: "rsbuild-webpack:output",
@@ -49,8 +49,8 @@ const pluginOutput = () => ({
49
49
  const cssFilename = (0, import_shared.getFilename)(config, "css", isProd);
50
50
  chain.plugin(CHAIN_ID.PLUGIN.MINI_CSS_EXTRACT).use(MiniCssExtractPlugin, [
51
51
  {
52
- filename: import_path.posix.join(cssPath, cssFilename),
53
- chunkFilename: import_path.posix.join(cssPath, `async/${cssFilename}`),
52
+ filename: import_node_path.posix.join(cssPath, cssFilename),
53
+ chunkFilename: import_node_path.posix.join(cssPath, `async/${cssFilename}`),
54
54
  ignoreOrder: true,
55
55
  ...extractPluginOptions
56
56
  }
@@ -31,8 +31,8 @@ __export(server_exports, {
31
31
  pluginServer: () => pluginServer
32
32
  });
33
33
  module.exports = __toCommonJS(server_exports);
34
- var import_fs = __toESM(require("fs"));
35
- var import_path = require("path");
34
+ var import_node_fs = __toESM(require("node:fs"));
35
+ var import_node_path = require("node:path");
36
36
  const pluginServer = () => ({
37
37
  name: "rsbuild:server",
38
38
  setup(api) {
@@ -43,7 +43,7 @@ const pluginServer = () => ({
43
43
  if (!copyOnBuild || !name) {
44
44
  return;
45
45
  }
46
- const publicDir = (0, import_path.isAbsolute)(name) ? name : (0, import_path.join)(api.context.rootPath, name);
46
+ const publicDir = (0, import_node_path.isAbsolute)(name) ? name : (0, import_node_path.join)(api.context.rootPath, name);
47
47
  const publicPattern = [
48
48
  {
49
49
  from: publicDir,
@@ -51,7 +51,7 @@ const pluginServer = () => ({
51
51
  noErrorOnMissing: true
52
52
  }
53
53
  ];
54
- if (!import_fs.default.existsSync(publicDir)) {
54
+ if (!import_node_fs.default.existsSync(publicDir)) {
55
55
  return;
56
56
  }
57
57
  const { default: CopyPlugin } = await Promise.resolve().then(() => __toESM(require("../../compiled/copy-webpack-plugin")));
@@ -36,7 +36,7 @@ __export(bus_exports, {
36
36
  bus: () => bus
37
37
  });
38
38
  module.exports = __toCommonJS(bus_exports);
39
- var import_console = require("console");
39
+ var import_node_console = require("node:console");
40
40
  var import_patch_console = __toESM(require("../../../compiled/patch-console"));
41
41
  var import_cli_truncate = __toESM(require("../../../compiled/cli-truncate"));
42
42
  var import_bar = require("./bar");
@@ -51,7 +51,7 @@ class Bus {
51
51
  __publicField(this, "destroyed", false);
52
52
  this.prevOutput = "";
53
53
  this.log = (0, import_log.create)(process.stdout);
54
- console.Console = import_console.Console;
54
+ console.Console = import_node_console.Console;
55
55
  this.restore = (0, import_patch_console.default)((type, data) => {
56
56
  this.writeToStd(type, data);
57
57
  });
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import type { Writable } from 'stream';
2
+ import type { Writable } from 'node:stream';
3
3
  export interface LogUpdate {
4
4
  clear: () => void;
5
5
  done: () => void;
package/dist/shared.js CHANGED
@@ -32,8 +32,8 @@ __export(shared_exports, {
32
32
  getCompiledPath: () => getCompiledPath
33
33
  });
34
34
  module.exports = __toCommonJS(shared_exports);
35
- var import_fs = __toESM(require("fs"));
36
- var import_path = require("path");
35
+ var import_node_fs = __toESM(require("node:fs"));
36
+ var import_node_path = require("node:path");
37
37
  var import_shared = require("@rsbuild/shared");
38
38
  var import_shared2 = require("@rsbuild/shared");
39
39
  const applyDefaultPlugins = (plugins) => (0, import_shared2.awaitableGetter)([
@@ -68,8 +68,8 @@ const applyDefaultPlugins = (plugins) => (0, import_shared2.awaitableGetter)([
68
68
  plugins.server()
69
69
  ]);
70
70
  const getCompiledPath = (packageName) => {
71
- const providerCompilerPath = (0, import_path.join)(__dirname, "../../compiled", packageName);
72
- if (import_fs.default.existsSync(providerCompilerPath)) {
71
+ const providerCompilerPath = (0, import_node_path.join)(__dirname, "../../compiled", packageName);
72
+ if (import_node_fs.default.existsSync(providerCompilerPath)) {
73
73
  return providerCompilerPath;
74
74
  }
75
75
  return (0, import_shared.getSharedPkgCompiledPath)(packageName);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/webpack",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "homepage": "https://rsbuild.dev",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,13 +35,13 @@
35
35
  "terser-webpack-plugin": "5.3.10",
36
36
  "tsconfig-paths-webpack-plugin": "4.1.0",
37
37
  "webpack": "^5.89.0",
38
- "@rsbuild/core": "0.3.6",
39
- "@rsbuild/shared": "0.3.6"
38
+ "@rsbuild/core": "0.3.7",
39
+ "@rsbuild/shared": "0.3.7"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/node": "16.x",
43
43
  "typescript": "^5.3.0",
44
- "@scripts/test-helper": "0.3.6"
44
+ "@scripts/test-helper": "0.3.7"
45
45
  },
46
46
  "publishConfig": {
47
47
  "access": "public",