@rsbuild/webpack 1.2.1 → 1.2.3

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/README.md CHANGED
@@ -1,12 +1,16 @@
1
- <p align="center">
2
- <a href="https://rsbuild.dev" target="blank"><img src="https://assets.rspack.dev/rsbuild/rsbuild-banner.png" alt="Rsbuild Logo" /></a>
3
- </p>
4
-
5
1
  # @rsbuild/webpack
6
2
 
7
3
  This package can be used to switch Rsbuild's bundler from Rspack to webpack.
8
4
 
9
- Note that this package is mainly used for compatibility with Modern.js and Rsbuild internal testing. We do not recommend you to use this package in a Rsbuild project. The API of the current package may change over iterations.
5
+ <p>
6
+ <a href="https://npmjs.com/package/@rsbuild/webpack">
7
+ <img src="https://img.shields.io/npm/v/@rsbuild/webpack?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
8
+ </a>
9
+ <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
10
+ <a href="https://npmcharts.com/compare/@rsbuild/webpack?minimal=true"><img src="https://img.shields.io/npm/dm/@rsbuild/webpack.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a>
11
+ </p>
12
+
13
+ > Note that this package is mainly used for compatibility with Modern.js and Rsbuild internal testing. We do not recommend you to use this package in a Rsbuild project. The API of the current package may change over iterations.
10
14
 
11
15
  ## Usage
12
16
 
@@ -29,12 +33,8 @@ export default defineConfig({
29
33
 
30
34
  ## Documentation
31
35
 
32
- https://rsbuild.dev/
33
-
34
- ## Contributing
35
-
36
- Please read the [Contributing Guide](https://github.com/web-infra-dev/rsbuild/blob/main/CONTRIBUTING.md).
36
+ See [Documentation](https://rsbuild.dev).
37
37
 
38
38
  ## License
39
39
 
40
- Rsbuild is [MIT licensed](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
40
+ [MIT](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  let __rslib_import_meta_url__ = 'undefined' == typeof document ? new (require('url'.replace('', ''))).URL('file:' + __filename).href : document.currentScript && document.currentScript.src || new URL('main.js', document.baseURI).href;
3
3
  exports.ids = [
4
- '970'
4
+ '511'
5
5
  ], exports.modules = {
6
6
  "./src/progress/ProgressPlugin.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
7
7
  __webpack_require__.d(__webpack_exports__, {
@@ -1,5 +1,5 @@
1
1
  export const ids = [
2
- '301'
2
+ '636'
3
3
  ];
4
4
  export const modules = {
5
5
  "./src/progress/ProgressPlugin.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
package/dist/index.cjs CHANGED
@@ -134,7 +134,7 @@ var __webpack_exports__ = {};
134
134
  async function modifyWebpackChain(context, utils, chain) {
135
135
  var _utils_environment_config_tools;
136
136
  core_.logger.debug('modify webpack chain');
137
- let [modifiedChain] = await context.hooks.modifyWebpackChain.callInEnvironment({
137
+ let [modifiedChain] = await context.hooks.modifyWebpackChain.callChain({
138
138
  environment: utils.environment.name,
139
139
  args: [
140
140
  chain,
@@ -147,7 +147,7 @@ var __webpack_exports__ = {};
147
147
  async function modifyWebpackConfig(context, webpackConfig, utils) {
148
148
  var _utils_environment_config_tools;
149
149
  core_.logger.debug('modify webpack config');
150
- let [modifiedConfig] = await context.hooks.modifyWebpackConfig.callInEnvironment({
150
+ let [modifiedConfig] = await context.hooks.modifyWebpackConfig.callChain({
151
151
  environment: utils.environment.name,
152
152
  args: [
153
153
  webpackConfig,
@@ -223,7 +223,7 @@ var __webpack_exports__ = {};
223
223
  async function createCompiler_createCompiler(options) {
224
224
  core_.logger.debug('create compiler');
225
225
  let { helpers, context } = options, { webpackConfigs } = await initConfigs(options);
226
- await context.hooks.onBeforeCreateCompiler.call({
226
+ await context.hooks.onBeforeCreateCompiler.callBatch({
227
227
  bundlerConfigs: webpackConfigs,
228
228
  environments: context.environments
229
229
  });
@@ -243,7 +243,7 @@ var __webpack_exports__ = {};
243
243
  context,
244
244
  bundlerConfigs: webpackConfigs,
245
245
  MultiStatsCtor: MultiStats_js_default()
246
- }), await context.hooks.onAfterCreateCompiler.call({
246
+ }), await context.hooks.onAfterCreateCompiler.callBatch({
247
247
  compiler,
248
248
  environments: context.environments
249
249
  }), core_.logger.debug('create compiler done'), {
@@ -327,7 +327,7 @@ var __webpack_exports__ = {};
327
327
  if (progress) {
328
328
  let { ProgressPlugin } = await Promise.all([
329
329
  __webpack_require__.e("997"),
330
- __webpack_require__.e("970")
330
+ __webpack_require__.e("511")
331
331
  ]).then(__webpack_require__.bind(__webpack_require__, "./src/progress/ProgressPlugin.ts"));
332
332
  chain.plugin(CHAIN_ID.PLUGIN.PROGRESS).use(ProgressPlugin, [
333
333
  {
package/dist/index.js CHANGED
@@ -125,7 +125,7 @@ let castArray = (arr)=>void 0 === arr ? [] : Array.isArray(arr) ? arr : [
125
125
  async function modifyWebpackChain(context, utils, chain) {
126
126
  var _utils_environment_config_tools;
127
127
  core_.logger.debug('modify webpack chain');
128
- let [modifiedChain] = await context.hooks.modifyWebpackChain.callInEnvironment({
128
+ let [modifiedChain] = await context.hooks.modifyWebpackChain.callChain({
129
129
  environment: utils.environment.name,
130
130
  args: [
131
131
  chain,
@@ -138,7 +138,7 @@ async function modifyWebpackChain(context, utils, chain) {
138
138
  async function modifyWebpackConfig(context, webpackConfig, utils) {
139
139
  var _utils_environment_config_tools;
140
140
  core_.logger.debug('modify webpack config');
141
- let [modifiedConfig] = await context.hooks.modifyWebpackConfig.callInEnvironment({
141
+ let [modifiedConfig] = await context.hooks.modifyWebpackConfig.callChain({
142
142
  environment: utils.environment.name,
143
143
  args: [
144
144
  webpackConfig,
@@ -214,7 +214,7 @@ async function initConfigs({ context, pluginManager, rsbuildOptions, helpers })
214
214
  async function createCompiler_createCompiler(options) {
215
215
  core_.logger.debug('create compiler');
216
216
  let { helpers, context } = options, { webpackConfigs } = await initConfigs(options);
217
- await context.hooks.onBeforeCreateCompiler.call({
217
+ await context.hooks.onBeforeCreateCompiler.callBatch({
218
218
  bundlerConfigs: webpackConfigs,
219
219
  environments: context.environments
220
220
  });
@@ -234,7 +234,7 @@ async function createCompiler_createCompiler(options) {
234
234
  context,
235
235
  bundlerConfigs: webpackConfigs,
236
236
  MultiStatsCtor: __WEBPACK_EXTERNAL_MODULE_webpack_lib_MultiStats_js_a72a7b8d__.default
237
- }), await context.hooks.onAfterCreateCompiler.call({
237
+ }), await context.hooks.onAfterCreateCompiler.callBatch({
238
238
  compiler,
239
239
  environments: context.environments
240
240
  }), core_.logger.debug('create compiler done'), {
@@ -315,7 +315,7 @@ let getMainFields = (chain, target)=>{
315
315
  if (progress) {
316
316
  let { ProgressPlugin } = await Promise.all([
317
317
  __webpack_require__.e("997"),
318
- __webpack_require__.e("301")
318
+ __webpack_require__.e("636")
319
319
  ]).then(__webpack_require__.bind(__webpack_require__, "./src/progress/ProgressPlugin.ts"));
320
320
  chain.plugin(CHAIN_ID.PLUGIN.PROGRESS).use(ProgressPlugin, [
321
321
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/webpack",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
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.97.1"
32
+ "webpack": "^5.98.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@rslib/core": "0.4.0",
36
- "@types/node": "^22.13.0",
35
+ "@rslib/core": "0.4.1",
36
+ "@types/node": "^22.13.4",
37
37
  "ansi-escapes": "4.3.2",
38
38
  "cli-truncate": "2.1.0",
39
39
  "patch-console": "1.0.0",
40
40
  "typescript": "^5.7.3",
41
- "@rsbuild/core": "1.2.4",
41
+ "@rsbuild/core": "1.2.9",
42
42
  "@scripts/test-helper": "1.0.1"
43
43
  },
44
44
  "peerDependencies": {