@rsbuild/webpack 1.3.0 → 1.3.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.
- package/dist/{76.js → 812.js} +6 -9
- package/dist/{659.cjs → 818.cjs} +6 -9
- package/dist/997.cjs +1 -1
- package/dist/997.js +1 -1
- package/dist/index.cjs +35 -51
- package/dist/index.js +20 -47
- package/package.json +7 -7
- package/dist/inspectConfig.d.ts +0 -7
package/dist/{76.js → 812.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const __webpack_ids__ = [
|
|
2
|
-
|
|
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
|
|
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/{659.cjs → 818.cjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
exports.ids = [
|
|
3
|
-
|
|
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
|
|
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
package/dist/997.js
CHANGED
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) {
|
|
@@ -79,41 +89,6 @@ for(var __webpack_i__ in (()=>{
|
|
|
79
89
|
var core_ = __webpack_require__("@rsbuild/core");
|
|
80
90
|
let MultiStats_js_namespaceObject = require("webpack/lib/MultiStats.js");
|
|
81
91
|
var MultiStats_js_default = __webpack_require__.n(MultiStats_js_namespaceObject);
|
|
82
|
-
let external_node_path_namespaceObject = require("node:path"), getInspectOutputPath = (context, inspectOptions)=>inspectOptions.outputPath ? (0, external_node_path_namespaceObject.isAbsolute)(inspectOptions.outputPath) ? inspectOptions.outputPath : (0, external_node_path_namespaceObject.join)(context.distPath, inspectOptions.outputPath) : (0, external_node_path_namespaceObject.join)(context.distPath, '.rsbuild');
|
|
83
|
-
async function inspectConfig({ helpers, context, pluginManager, rsbuildOptions, bundlerConfigs, inspectOptions = {} }) {
|
|
84
|
-
inspectOptions.mode ? process.env.NODE_ENV = inspectOptions.mode : process.env.NODE_ENV || (process.env.NODE_ENV = 'development');
|
|
85
|
-
let webpackConfigs = bundlerConfigs || (await initConfigs({
|
|
86
|
-
context,
|
|
87
|
-
pluginManager,
|
|
88
|
-
rsbuildOptions,
|
|
89
|
-
helpers
|
|
90
|
-
})).webpackConfigs, rawBundlerConfigs = webpackConfigs.map((config, index)=>({
|
|
91
|
-
name: config.name || String(index),
|
|
92
|
-
content: helpers.stringifyConfig(config, inspectOptions.verbose)
|
|
93
|
-
})), { rsbuildConfig, rawRsbuildConfig, environmentConfigs, rawEnvironmentConfigs } = helpers.getRsbuildInspectConfig({
|
|
94
|
-
normalizedConfig: context.normalizedConfig,
|
|
95
|
-
inspectOptions,
|
|
96
|
-
pluginManager
|
|
97
|
-
}), outputPath = getInspectOutputPath(context, inspectOptions);
|
|
98
|
-
return inspectOptions.writeToDisk && await helpers.outputInspectConfigFiles({
|
|
99
|
-
rawBundlerConfigs,
|
|
100
|
-
rawEnvironmentConfigs,
|
|
101
|
-
inspectOptions: {
|
|
102
|
-
...inspectOptions,
|
|
103
|
-
outputPath
|
|
104
|
-
},
|
|
105
|
-
configType: 'webpack'
|
|
106
|
-
}), {
|
|
107
|
-
rsbuildConfig: rawRsbuildConfig,
|
|
108
|
-
environmentConfigs: rawEnvironmentConfigs.map((r)=>r.content),
|
|
109
|
-
bundlerConfigs: rawBundlerConfigs.map((r)=>r.content),
|
|
110
|
-
origin: {
|
|
111
|
-
rsbuildConfig,
|
|
112
|
-
environmentConfigs,
|
|
113
|
-
bundlerConfigs: webpackConfigs
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
92
|
let external_reduce_configs_namespaceObject = require("reduce-configs"), castArray = (arr)=>void 0 === arr ? [] : Array.isArray(arr) ? arr : [
|
|
118
93
|
arr
|
|
119
94
|
];
|
|
@@ -127,7 +102,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
127
102
|
utils
|
|
128
103
|
]
|
|
129
104
|
});
|
|
130
|
-
if (null
|
|
105
|
+
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
106
|
return core_.logger.debug('modify webpack chain done'), modifiedChain;
|
|
132
107
|
}
|
|
133
108
|
async function modifyWebpackConfig(context, webpackConfig, utils) {
|
|
@@ -140,7 +115,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
140
115
|
utils
|
|
141
116
|
]
|
|
142
117
|
});
|
|
143
|
-
return (null
|
|
118
|
+
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
119
|
initial: modifiedConfig,
|
|
145
120
|
config: utils.environment.config.tools.webpack,
|
|
146
121
|
ctx: utils,
|
|
@@ -186,16 +161,16 @@ for(var __webpack_i__ in (()=>{
|
|
|
186
161
|
})));
|
|
187
162
|
if ('verbose' === core_.logger.level) {
|
|
188
163
|
let inspect = async ()=>{
|
|
189
|
-
await inspectConfig({
|
|
164
|
+
await helpers.inspectConfig({
|
|
190
165
|
context,
|
|
166
|
+
bundler: 'webpack',
|
|
191
167
|
pluginManager,
|
|
192
168
|
inspectOptions: {
|
|
193
169
|
verbose: !0,
|
|
194
170
|
writeToDisk: !0
|
|
195
171
|
},
|
|
196
172
|
rsbuildOptions,
|
|
197
|
-
bundlerConfigs: webpackConfigs
|
|
198
|
-
helpers
|
|
173
|
+
bundlerConfigs: webpackConfigs
|
|
199
174
|
});
|
|
200
175
|
};
|
|
201
176
|
context.hooks.onBeforeBuild.tap(async ({ isFirstCompile })=>{
|
|
@@ -312,7 +287,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
312
287
|
if (progress) {
|
|
313
288
|
let { ProgressPlugin } = await Promise.all([
|
|
314
289
|
__webpack_require__.e("997"),
|
|
315
|
-
__webpack_require__.e("
|
|
290
|
+
__webpack_require__.e("818")
|
|
316
291
|
]).then(__webpack_require__.bind(__webpack_require__, "./src/progress/ProgressPlugin.ts"));
|
|
317
292
|
chain.plugin(CHAIN_ID.PLUGIN.PROGRESS).use(ProgressPlugin, [
|
|
318
293
|
{
|
|
@@ -333,8 +308,8 @@ for(var __webpack_i__ in (()=>{
|
|
|
333
308
|
}
|
|
334
309
|
}), api.modifyWebpackConfig(async (config)=>{
|
|
335
310
|
var _config_plugins, _config_plugins1;
|
|
336
|
-
let copyPlugin = null
|
|
337
|
-
copyPlugin && copyPlugin.patterns.every((pattern)=>'string' != typeof pattern && pattern.context && !external_node_fs_default().existsSync(pattern.context)) && (config.plugins = null
|
|
311
|
+
let copyPlugin = null == (_config_plugins = config.plugins) ? void 0 : _config_plugins.find((item)=>(null == item ? void 0 : item.constructor.name) === 'CopyPlugin');
|
|
312
|
+
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
313
|
});
|
|
339
314
|
}
|
|
340
315
|
}), webpackProvider = async ({ context, pluginManager, rsbuildOptions, helpers })=>{
|
|
@@ -391,13 +366,22 @@ for(var __webpack_i__ in (()=>{
|
|
|
391
366
|
rsbuildOptions,
|
|
392
367
|
helpers
|
|
393
368
|
}, options),
|
|
394
|
-
inspectConfig
|
|
369
|
+
async inspectConfig (inspectOptions) {
|
|
370
|
+
let bundlerConfigs = (await initConfigs({
|
|
395
371
|
context,
|
|
396
372
|
pluginManager,
|
|
397
373
|
rsbuildOptions,
|
|
398
|
-
inspectOptions,
|
|
399
374
|
helpers
|
|
400
|
-
})
|
|
375
|
+
})).webpackConfigs;
|
|
376
|
+
return await helpers.inspectConfig({
|
|
377
|
+
context,
|
|
378
|
+
pluginManager,
|
|
379
|
+
bundler: 'webpack',
|
|
380
|
+
bundlerConfigs,
|
|
381
|
+
rsbuildOptions,
|
|
382
|
+
inspectOptions
|
|
383
|
+
});
|
|
384
|
+
}
|
|
401
385
|
};
|
|
402
386
|
};
|
|
403
387
|
})(), exports.webpackProvider = __webpack_exports__.webpackProvider, __webpack_exports__)-1 === [
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,6 @@ import * as __WEBPACK_EXTERNAL_MODULE_picocolors__ from "picocolors";
|
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE_stream__ from "stream";
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE_webpack__ from "webpack";
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE_webpack_lib_MultiStats_js_a72a7b8d__ from "webpack/lib/MultiStats.js";
|
|
7
|
-
import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
|
|
8
7
|
import * as __WEBPACK_EXTERNAL_MODULE_reduce_configs_02786df6__ from "reduce-configs";
|
|
9
8
|
import * as __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__ from "node:fs";
|
|
10
9
|
var installedChunks, installChunk, __webpack_modules__ = {
|
|
@@ -68,41 +67,6 @@ __webpack_require__.m = __webpack_modules__, __webpack_require__.n = (module)=>{
|
|
|
68
67
|
}
|
|
69
68
|
};
|
|
70
69
|
var core_ = __webpack_require__("@rsbuild/core");
|
|
71
|
-
let getInspectOutputPath = (context, inspectOptions)=>inspectOptions.outputPath ? (0, __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.isAbsolute)(inspectOptions.outputPath) ? inspectOptions.outputPath : (0, __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.join)(context.distPath, inspectOptions.outputPath) : (0, __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.join)(context.distPath, '.rsbuild');
|
|
72
|
-
async function inspectConfig({ helpers, context, pluginManager, rsbuildOptions, bundlerConfigs, inspectOptions = {} }) {
|
|
73
|
-
inspectOptions.mode ? process.env.NODE_ENV = inspectOptions.mode : process.env.NODE_ENV || (process.env.NODE_ENV = 'development');
|
|
74
|
-
let webpackConfigs = bundlerConfigs || (await initConfigs({
|
|
75
|
-
context,
|
|
76
|
-
pluginManager,
|
|
77
|
-
rsbuildOptions,
|
|
78
|
-
helpers
|
|
79
|
-
})).webpackConfigs, rawBundlerConfigs = webpackConfigs.map((config, index)=>({
|
|
80
|
-
name: config.name || String(index),
|
|
81
|
-
content: helpers.stringifyConfig(config, inspectOptions.verbose)
|
|
82
|
-
})), { rsbuildConfig, rawRsbuildConfig, environmentConfigs, rawEnvironmentConfigs } = helpers.getRsbuildInspectConfig({
|
|
83
|
-
normalizedConfig: context.normalizedConfig,
|
|
84
|
-
inspectOptions,
|
|
85
|
-
pluginManager
|
|
86
|
-
}), outputPath = getInspectOutputPath(context, inspectOptions);
|
|
87
|
-
return inspectOptions.writeToDisk && await helpers.outputInspectConfigFiles({
|
|
88
|
-
rawBundlerConfigs,
|
|
89
|
-
rawEnvironmentConfigs,
|
|
90
|
-
inspectOptions: {
|
|
91
|
-
...inspectOptions,
|
|
92
|
-
outputPath
|
|
93
|
-
},
|
|
94
|
-
configType: 'webpack'
|
|
95
|
-
}), {
|
|
96
|
-
rsbuildConfig: rawRsbuildConfig,
|
|
97
|
-
environmentConfigs: rawEnvironmentConfigs.map((r)=>r.content),
|
|
98
|
-
bundlerConfigs: rawBundlerConfigs.map((r)=>r.content),
|
|
99
|
-
origin: {
|
|
100
|
-
rsbuildConfig,
|
|
101
|
-
environmentConfigs,
|
|
102
|
-
bundlerConfigs: webpackConfigs
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
70
|
let castArray = (arr)=>void 0 === arr ? [] : Array.isArray(arr) ? arr : [
|
|
107
71
|
arr
|
|
108
72
|
];
|
|
@@ -116,7 +80,7 @@ async function modifyWebpackChain(context, utils, chain) {
|
|
|
116
80
|
utils
|
|
117
81
|
]
|
|
118
82
|
});
|
|
119
|
-
if (null
|
|
83
|
+
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
84
|
return core_.logger.debug('modify webpack chain done'), modifiedChain;
|
|
121
85
|
}
|
|
122
86
|
async function modifyWebpackConfig(context, webpackConfig, utils) {
|
|
@@ -129,7 +93,7 @@ async function modifyWebpackConfig(context, webpackConfig, utils) {
|
|
|
129
93
|
utils
|
|
130
94
|
]
|
|
131
95
|
});
|
|
132
|
-
return (null
|
|
96
|
+
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
97
|
initial: modifiedConfig,
|
|
134
98
|
config: utils.environment.config.tools.webpack,
|
|
135
99
|
ctx: utils,
|
|
@@ -175,16 +139,16 @@ async function initConfigs({ context, pluginManager, rsbuildOptions, helpers })
|
|
|
175
139
|
})));
|
|
176
140
|
if ('verbose' === core_.logger.level) {
|
|
177
141
|
let inspect = async ()=>{
|
|
178
|
-
await inspectConfig({
|
|
142
|
+
await helpers.inspectConfig({
|
|
179
143
|
context,
|
|
144
|
+
bundler: 'webpack',
|
|
180
145
|
pluginManager,
|
|
181
146
|
inspectOptions: {
|
|
182
147
|
verbose: !0,
|
|
183
148
|
writeToDisk: !0
|
|
184
149
|
},
|
|
185
150
|
rsbuildOptions,
|
|
186
|
-
bundlerConfigs: webpackConfigs
|
|
187
|
-
helpers
|
|
151
|
+
bundlerConfigs: webpackConfigs
|
|
188
152
|
});
|
|
189
153
|
};
|
|
190
154
|
context.hooks.onBeforeBuild.tap(async ({ isFirstCompile })=>{
|
|
@@ -298,7 +262,7 @@ let getMainFields = (chain, target)=>{
|
|
|
298
262
|
if (progress) {
|
|
299
263
|
let { ProgressPlugin } = await Promise.all([
|
|
300
264
|
__webpack_require__.e("997"),
|
|
301
|
-
__webpack_require__.e("
|
|
265
|
+
__webpack_require__.e("812")
|
|
302
266
|
]).then(__webpack_require__.bind(__webpack_require__, "./src/progress/ProgressPlugin.ts"));
|
|
303
267
|
chain.plugin(CHAIN_ID.PLUGIN.PROGRESS).use(ProgressPlugin, [
|
|
304
268
|
{
|
|
@@ -319,8 +283,8 @@ let getMainFields = (chain, target)=>{
|
|
|
319
283
|
}
|
|
320
284
|
}), api.modifyWebpackConfig(async (config)=>{
|
|
321
285
|
var _config_plugins, _config_plugins1;
|
|
322
|
-
let copyPlugin = null
|
|
323
|
-
copyPlugin && copyPlugin.patterns.every((pattern)=>'string' != typeof pattern && pattern.context && !__WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__.default.existsSync(pattern.context)) && (config.plugins = null
|
|
286
|
+
let copyPlugin = null == (_config_plugins = config.plugins) ? void 0 : _config_plugins.find((item)=>(null == item ? void 0 : item.constructor.name) === 'CopyPlugin');
|
|
287
|
+
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
288
|
});
|
|
325
289
|
}
|
|
326
290
|
}), webpackProvider = async ({ context, pluginManager, rsbuildOptions, helpers })=>{
|
|
@@ -377,13 +341,22 @@ let getMainFields = (chain, target)=>{
|
|
|
377
341
|
rsbuildOptions,
|
|
378
342
|
helpers
|
|
379
343
|
}, options),
|
|
380
|
-
inspectConfig
|
|
344
|
+
async inspectConfig (inspectOptions) {
|
|
345
|
+
let bundlerConfigs = (await initConfigs({
|
|
381
346
|
context,
|
|
382
347
|
pluginManager,
|
|
383
348
|
rsbuildOptions,
|
|
384
|
-
inspectOptions,
|
|
385
349
|
helpers
|
|
386
|
-
})
|
|
350
|
+
})).webpackConfigs;
|
|
351
|
+
return await helpers.inspectConfig({
|
|
352
|
+
context,
|
|
353
|
+
pluginManager,
|
|
354
|
+
bundler: 'webpack',
|
|
355
|
+
bundlerConfigs,
|
|
356
|
+
rsbuildOptions,
|
|
357
|
+
inspectOptions
|
|
358
|
+
});
|
|
359
|
+
}
|
|
387
360
|
};
|
|
388
361
|
};
|
|
389
362
|
export { webpackProvider };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/webpack",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"homepage": "https://rsbuild.dev",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,20 +29,20 @@
|
|
|
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.99.8"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@rslib/core": "0.
|
|
36
|
-
"@types/node": "^22.
|
|
35
|
+
"@rslib/core": "0.7.1",
|
|
36
|
+
"@types/node": "^22.15.19",
|
|
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.
|
|
41
|
-
"@rsbuild/core": "1.3.
|
|
40
|
+
"typescript": "^5.8.3",
|
|
41
|
+
"@rsbuild/core": "1.3.21",
|
|
42
42
|
"@scripts/test-helper": "1.0.1"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@rsbuild/core": "^1.
|
|
45
|
+
"@rsbuild/core": "^1.3.21"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public",
|
package/dist/inspectConfig.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { InspectConfigOptions, InspectConfigResult } from '@rsbuild/core';
|
|
2
|
-
import { type InitConfigsOptions } from './initConfigs.js';
|
|
3
|
-
import type { WebpackConfig } from './types.js';
|
|
4
|
-
export declare function inspectConfig({ helpers, context, pluginManager, rsbuildOptions, bundlerConfigs, inspectOptions, }: InitConfigsOptions & {
|
|
5
|
-
inspectOptions?: InspectConfigOptions;
|
|
6
|
-
bundlerConfigs?: WebpackConfig[];
|
|
7
|
-
}): Promise<InspectConfigResult<'webpack'>>;
|