@rsbuild/webpack 1.3.0 → 1.3.1

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,5 +1,5 @@
1
1
  export const __webpack_ids__ = [
2
- '76'
2
+ "812"
3
3
  ];
4
4
  export const __webpack_modules__ = {
5
5
  "./src/progress/ProgressPlugin.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
@@ -12,10 +12,10 @@ export const __webpack_modules__ = {
12
12
  current: 0,
13
13
  color: 'green',
14
14
  bgColor: 'gray',
15
- char: '━',
15
+ char: "\u2501",
16
16
  width: 25,
17
- buildIcon: '◯',
18
- errorIcon: '✖',
17
+ buildIcon: "\u25EF",
18
+ errorIcon: "\u2716",
19
19
  errorInfo: 'compile failed',
20
20
  message: '',
21
21
  done: !1,
@@ -102,10 +102,7 @@ export const __webpack_modules__ = {
102
102
  ], getProgressColor = (index)=>colorList[index % colorList.length], bus = new class {
103
103
  update(state) {
104
104
  let index = this.states.findIndex((i)=>i.id === state.id);
105
- if (-1 === index) {
106
- this.states.push(state);
107
- return;
108
- }
105
+ if (-1 === index) return void this.states.push(state);
109
106
  this.states[index] = state;
110
107
  }
111
108
  writeToStd(type = 'stdout', data) {
@@ -114,7 +111,7 @@ export const __webpack_modules__ = {
114
111
  render() {
115
112
  let maxIdLen = Math.max(...this.states.map((i)=>{
116
113
  var _i_id;
117
- return (null === (_i_id = i.id) || void 0 === _i_id ? void 0 : _i_id.length) ?? 0;
114
+ return (null == (_i_id = i.id) ? void 0 : _i_id.length) ?? 0;
118
115
  })) + 2, { columns = 70 } = process.stdout;
119
116
  this.prevOutput = this.states.map((i, k)=>{
120
117
  let bar = renderBar({
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  exports.ids = [
3
- '659'
3
+ "818"
4
4
  ], exports.modules = {
5
5
  "./src/progress/ProgressPlugin.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
6
6
  __webpack_require__.d(__webpack_exports__, {
@@ -12,10 +12,10 @@ exports.ids = [
12
12
  current: 0,
13
13
  color: 'green',
14
14
  bgColor: 'gray',
15
- char: '━',
15
+ char: "\u2501",
16
16
  width: 25,
17
- buildIcon: '◯',
18
- errorIcon: '✖',
17
+ buildIcon: "\u25EF",
18
+ errorIcon: "\u2716",
19
19
  errorInfo: 'compile failed',
20
20
  message: '',
21
21
  done: !1,
@@ -102,10 +102,7 @@ exports.ids = [
102
102
  ], getProgressColor = (index)=>colorList[index % colorList.length], bus = new class {
103
103
  update(state) {
104
104
  let index = this.states.findIndex((i)=>i.id === state.id);
105
- if (-1 === index) {
106
- this.states.push(state);
107
- return;
108
- }
105
+ if (-1 === index) return void this.states.push(state);
109
106
  this.states[index] = state;
110
107
  }
111
108
  writeToStd(type = 'stdout', data) {
@@ -114,7 +111,7 @@ exports.ids = [
114
111
  render() {
115
112
  let maxIdLen = Math.max(...this.states.map((i)=>{
116
113
  var _i_id;
117
- return (null === (_i_id = i.id) || void 0 === _i_id ? void 0 : _i_id.length) ?? 0;
114
+ return (null == (_i_id = i.id) ? void 0 : _i_id.length) ?? 0;
118
115
  })) + 2, { columns = 70 } = process.stdout;
119
116
  this.prevOutput = this.states.map((i, k)=>{
120
117
  let bar = renderBar({
package/dist/997.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  exports.ids = [
2
- '997'
2
+ "997"
3
3
  ], exports.modules = {
4
4
  "../../../node_modules/.pnpm/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js": function(module) {
5
5
  "use strict";
package/dist/997.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export const __webpack_ids__ = [
2
- '997'
2
+ "997"
3
3
  ];
4
4
  export const __webpack_modules__ = {
5
5
  "../../../node_modules/.pnpm/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js": function(module) {
package/dist/index.cjs CHANGED
@@ -17,19 +17,29 @@ var __webpack_modules__ = {
17
17
  module.exports = require("webpack");
18
18
  },
19
19
  "copy-webpack-plugin": function(module) {
20
- module.exports = import("copy-webpack-plugin");
20
+ module.exports = import("copy-webpack-plugin").then(function(module) {
21
+ return module;
22
+ });
21
23
  },
22
24
  "html-webpack-plugin": function(module) {
23
- module.exports = import("html-webpack-plugin");
25
+ module.exports = import("html-webpack-plugin").then(function(module) {
26
+ return module;
27
+ });
24
28
  },
25
29
  "mini-css-extract-plugin": function(module) {
26
- module.exports = import("mini-css-extract-plugin");
30
+ module.exports = import("mini-css-extract-plugin").then(function(module) {
31
+ return module;
32
+ });
27
33
  },
28
34
  "tsconfig-paths-webpack-plugin": function(module) {
29
- module.exports = import("tsconfig-paths-webpack-plugin");
35
+ module.exports = import("tsconfig-paths-webpack-plugin").then(function(module) {
36
+ return module;
37
+ });
30
38
  },
31
39
  "webpack?fd69": function(module) {
32
- module.exports = import("webpack");
40
+ module.exports = import("webpack").then(function(module) {
41
+ return module;
42
+ });
33
43
  }
34
44
  }, __webpack_module_cache__ = {};
35
45
  function __webpack_require__(moduleId) {
@@ -127,7 +137,7 @@ for(var __webpack_i__ in (()=>{
127
137
  utils
128
138
  ]
129
139
  });
130
- if (null === (_utils_environment_config_tools = utils.environment.config.tools) || void 0 === _utils_environment_config_tools ? void 0 : _utils_environment_config_tools.webpackChain) for (let item of castArray(utils.environment.config.tools.webpackChain))item(modifiedChain, utils);
140
+ if (null == (_utils_environment_config_tools = utils.environment.config.tools) ? void 0 : _utils_environment_config_tools.webpackChain) for (let item of castArray(utils.environment.config.tools.webpackChain))item(modifiedChain, utils);
131
141
  return core_.logger.debug('modify webpack chain done'), modifiedChain;
132
142
  }
133
143
  async function modifyWebpackConfig(context, webpackConfig, utils) {
@@ -140,7 +150,7 @@ for(var __webpack_i__ in (()=>{
140
150
  utils
141
151
  ]
142
152
  });
143
- return (null === (_utils_environment_config_tools = utils.environment.config.tools) || void 0 === _utils_environment_config_tools ? void 0 : _utils_environment_config_tools.webpack) && (modifiedConfig = (0, external_reduce_configs_namespaceObject.reduceConfigsWithContext)({
153
+ return (null == (_utils_environment_config_tools = utils.environment.config.tools) ? void 0 : _utils_environment_config_tools.webpack) && (modifiedConfig = (0, external_reduce_configs_namespaceObject.reduceConfigsWithContext)({
144
154
  initial: modifiedConfig,
145
155
  config: utils.environment.config.tools.webpack,
146
156
  ctx: utils,
@@ -312,7 +322,7 @@ for(var __webpack_i__ in (()=>{
312
322
  if (progress) {
313
323
  let { ProgressPlugin } = await Promise.all([
314
324
  __webpack_require__.e("997"),
315
- __webpack_require__.e("659")
325
+ __webpack_require__.e("818")
316
326
  ]).then(__webpack_require__.bind(__webpack_require__, "./src/progress/ProgressPlugin.ts"));
317
327
  chain.plugin(CHAIN_ID.PLUGIN.PROGRESS).use(ProgressPlugin, [
318
328
  {
@@ -333,8 +343,8 @@ for(var __webpack_i__ in (()=>{
333
343
  }
334
344
  }), api.modifyWebpackConfig(async (config)=>{
335
345
  var _config_plugins, _config_plugins1;
336
- let copyPlugin = null === (_config_plugins = config.plugins) || void 0 === _config_plugins ? void 0 : _config_plugins.find((item)=>(null == item ? void 0 : item.constructor.name) === 'CopyPlugin');
337
- copyPlugin && copyPlugin.patterns.every((pattern)=>'string' != typeof pattern && pattern.context && !external_node_fs_default().existsSync(pattern.context)) && (config.plugins = null === (_config_plugins1 = config.plugins) || void 0 === _config_plugins1 ? void 0 : _config_plugins1.filter((item)=>(null == item ? void 0 : item.constructor.name) !== 'CopyPlugin'));
346
+ let copyPlugin = null == (_config_plugins = config.plugins) ? void 0 : _config_plugins.find((item)=>(null == item ? void 0 : item.constructor.name) === 'CopyPlugin');
347
+ copyPlugin && copyPlugin.patterns.every((pattern)=>'string' != typeof pattern && pattern.context && !external_node_fs_default().existsSync(pattern.context)) && (config.plugins = null == (_config_plugins1 = config.plugins) ? void 0 : _config_plugins1.filter((item)=>(null == item ? void 0 : item.constructor.name) !== 'CopyPlugin'));
338
348
  });
339
349
  }
340
350
  }), webpackProvider = async ({ context, pluginManager, rsbuildOptions, helpers })=>{
package/dist/index.js CHANGED
@@ -116,7 +116,7 @@ async function modifyWebpackChain(context, utils, chain) {
116
116
  utils
117
117
  ]
118
118
  });
119
- if (null === (_utils_environment_config_tools = utils.environment.config.tools) || void 0 === _utils_environment_config_tools ? void 0 : _utils_environment_config_tools.webpackChain) for (let item of castArray(utils.environment.config.tools.webpackChain))item(modifiedChain, utils);
119
+ if (null == (_utils_environment_config_tools = utils.environment.config.tools) ? void 0 : _utils_environment_config_tools.webpackChain) for (let item of castArray(utils.environment.config.tools.webpackChain))item(modifiedChain, utils);
120
120
  return core_.logger.debug('modify webpack chain done'), modifiedChain;
121
121
  }
122
122
  async function modifyWebpackConfig(context, webpackConfig, utils) {
@@ -129,7 +129,7 @@ async function modifyWebpackConfig(context, webpackConfig, utils) {
129
129
  utils
130
130
  ]
131
131
  });
132
- return (null === (_utils_environment_config_tools = utils.environment.config.tools) || void 0 === _utils_environment_config_tools ? void 0 : _utils_environment_config_tools.webpack) && (modifiedConfig = (0, __WEBPACK_EXTERNAL_MODULE_reduce_configs_02786df6__.reduceConfigsWithContext)({
132
+ return (null == (_utils_environment_config_tools = utils.environment.config.tools) ? void 0 : _utils_environment_config_tools.webpack) && (modifiedConfig = (0, __WEBPACK_EXTERNAL_MODULE_reduce_configs_02786df6__.reduceConfigsWithContext)({
133
133
  initial: modifiedConfig,
134
134
  config: utils.environment.config.tools.webpack,
135
135
  ctx: utils,
@@ -298,7 +298,7 @@ let getMainFields = (chain, target)=>{
298
298
  if (progress) {
299
299
  let { ProgressPlugin } = await Promise.all([
300
300
  __webpack_require__.e("997"),
301
- __webpack_require__.e("76")
301
+ __webpack_require__.e("812")
302
302
  ]).then(__webpack_require__.bind(__webpack_require__, "./src/progress/ProgressPlugin.ts"));
303
303
  chain.plugin(CHAIN_ID.PLUGIN.PROGRESS).use(ProgressPlugin, [
304
304
  {
@@ -319,8 +319,8 @@ let getMainFields = (chain, target)=>{
319
319
  }
320
320
  }), api.modifyWebpackConfig(async (config)=>{
321
321
  var _config_plugins, _config_plugins1;
322
- let copyPlugin = null === (_config_plugins = config.plugins) || void 0 === _config_plugins ? void 0 : _config_plugins.find((item)=>(null == item ? void 0 : item.constructor.name) === 'CopyPlugin');
323
- copyPlugin && copyPlugin.patterns.every((pattern)=>'string' != typeof pattern && pattern.context && !__WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.default.existsSync(pattern.context)) && (config.plugins = null === (_config_plugins1 = config.plugins) || void 0 === _config_plugins1 ? void 0 : _config_plugins1.filter((item)=>(null == item ? void 0 : item.constructor.name) !== 'CopyPlugin'));
322
+ let copyPlugin = null == (_config_plugins = config.plugins) ? void 0 : _config_plugins.find((item)=>(null == item ? void 0 : item.constructor.name) === 'CopyPlugin');
323
+ copyPlugin && copyPlugin.patterns.every((pattern)=>'string' != typeof pattern && pattern.context && !__WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.default.existsSync(pattern.context)) && (config.plugins = null == (_config_plugins1 = config.plugins) ? void 0 : _config_plugins1.filter((item)=>(null == item ? void 0 : item.constructor.name) !== 'CopyPlugin'));
324
324
  });
325
325
  }
326
326
  }), webpackProvider = async ({ context, pluginManager, rsbuildOptions, helpers })=>{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/webpack",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "homepage": "https://rsbuild.dev",
5
5
  "repository": {
6
6
  "type": "git",
@@ -29,16 +29,16 @@
29
29
  "picocolors": "^1.1.1",
30
30
  "reduce-configs": "^1.1.0",
31
31
  "tsconfig-paths-webpack-plugin": "4.2.0",
32
- "webpack": "^5.98.0"
32
+ "webpack": "^5.99.8"
33
33
  },
34
34
  "devDependencies": {
35
- "@rslib/core": "0.6.0",
36
- "@types/node": "^22.13.11",
35
+ "@rslib/core": "0.7.0",
36
+ "@types/node": "^22.15.17",
37
37
  "ansi-escapes": "4.3.2",
38
38
  "cli-truncate": "2.1.0",
39
39
  "patch-console": "1.0.0",
40
- "typescript": "^5.8.2",
41
- "@rsbuild/core": "1.3.0",
40
+ "typescript": "^5.8.3",
41
+ "@rsbuild/core": "1.3.20",
42
42
  "@scripts/test-helper": "1.0.1"
43
43
  },
44
44
  "peerDependencies": {