@rsbuild/webpack 1.2.2 → 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 +11 -11
- package/dist/index.cjs +4 -4
- package/dist/index.js +4 -4
- package/package.json +4 -4
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
|
-
|
|
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
|
-
|
|
40
|
+
[MIT](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
246
|
+
}), await context.hooks.onAfterCreateCompiler.callBatch({
|
|
247
247
|
compiler,
|
|
248
248
|
environments: context.environments
|
|
249
249
|
}), core_.logger.debug('create compiler done'), {
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
237
|
+
}), await context.hooks.onAfterCreateCompiler.callBatch({
|
|
238
238
|
compiler,
|
|
239
239
|
environments: context.environments
|
|
240
240
|
}), core_.logger.debug('create compiler done'), {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/webpack",
|
|
3
|
-
"version": "1.2.
|
|
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.
|
|
32
|
+
"webpack": "^5.98.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@rslib/core": "0.4.1",
|
|
36
|
-
"@types/node": "^22.13.
|
|
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.
|
|
41
|
+
"@rsbuild/core": "1.2.9",
|
|
42
42
|
"@scripts/test-helper": "1.0.1"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|