@rsbuild/webpack 1.2.0 → 1.2.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.
- package/README.md +1 -1
- package/dist/{487.js → 301.js} +1 -1
- package/dist/{694.cjs → 970.cjs} +1 -1
- package/dist/index.cjs +4 -3
- package/dist/index.js +4 -3
- package/dist/plugin.d.ts +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# @rsbuild/webpack
|
|
6
6
|
|
|
7
|
-
This package can be used to switch Rsbuild's bundler from
|
|
7
|
+
This package can be used to switch Rsbuild's bundler from Rspack to webpack.
|
|
8
8
|
|
|
9
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.
|
|
10
10
|
|
package/dist/{487.js → 301.js}
RENAMED
package/dist/{694.cjs → 970.cjs}
RENAMED
|
@@ -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
|
-
'
|
|
4
|
+
'970'
|
|
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__, {
|
package/dist/index.cjs
CHANGED
|
@@ -175,16 +175,17 @@ var __webpack_exports__ = {};
|
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
177
|
async function generateWebpackConfig({ target, context, environment, helpers }) {
|
|
178
|
-
let chainUtils = await getChainUtils(target, context.environments[environment], helpers), { default: webpack } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "webpack?fd69")), { BannerPlugin, DefinePlugin, IgnorePlugin, ProvidePlugin, HotModuleReplacementPlugin } = webpack, bundlerChain = await helpers.modifyBundlerChain(context, {
|
|
178
|
+
let chainUtils = await getChainUtils(target, context.environments[environment], helpers), { default: webpack } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "webpack?fd69")), { BannerPlugin, DefinePlugin, IgnorePlugin, ProvidePlugin, SourceMapDevToolPlugin, HotModuleReplacementPlugin } = webpack, bundlerChain = await helpers.modifyBundlerChain(context, {
|
|
179
179
|
...chainUtils,
|
|
180
180
|
bundler: {
|
|
181
181
|
BannerPlugin,
|
|
182
182
|
DefinePlugin,
|
|
183
183
|
IgnorePlugin,
|
|
184
184
|
ProvidePlugin,
|
|
185
|
+
SourceMapDevToolPlugin,
|
|
185
186
|
HotModuleReplacementPlugin
|
|
186
187
|
}
|
|
187
|
-
}),
|
|
188
|
+
}), webpackConfig = (await modifyWebpackChain(context, chainUtils, bundlerChain)).toConfig(), configUtils = await helpers.getConfigUtils(webpackConfig, chainUtils);
|
|
188
189
|
return await modifyWebpackConfig(context, webpackConfig, configUtils);
|
|
189
190
|
}
|
|
190
191
|
async function initConfigs({ context, pluginManager, rsbuildOptions, helpers }) {
|
|
@@ -326,7 +327,7 @@ var __webpack_exports__ = {};
|
|
|
326
327
|
if (progress) {
|
|
327
328
|
let { ProgressPlugin } = await Promise.all([
|
|
328
329
|
__webpack_require__.e("997"),
|
|
329
|
-
__webpack_require__.e("
|
|
330
|
+
__webpack_require__.e("970")
|
|
330
331
|
]).then(__webpack_require__.bind(__webpack_require__, "./src/progress/ProgressPlugin.ts"));
|
|
331
332
|
chain.plugin(CHAIN_ID.PLUGIN.PROGRESS).use(ProgressPlugin, [
|
|
332
333
|
{
|
package/dist/index.js
CHANGED
|
@@ -166,16 +166,17 @@ async function getChainUtils(target, environment, helpers) {
|
|
|
166
166
|
};
|
|
167
167
|
}
|
|
168
168
|
async function generateWebpackConfig({ target, context, environment, helpers }) {
|
|
169
|
-
let chainUtils = await getChainUtils(target, context.environments[environment], helpers), { default: webpack } = await import("webpack"), { BannerPlugin, DefinePlugin, IgnorePlugin, ProvidePlugin, HotModuleReplacementPlugin } = webpack, bundlerChain = await helpers.modifyBundlerChain(context, {
|
|
169
|
+
let chainUtils = await getChainUtils(target, context.environments[environment], helpers), { default: webpack } = await import("webpack"), { BannerPlugin, DefinePlugin, IgnorePlugin, ProvidePlugin, SourceMapDevToolPlugin, HotModuleReplacementPlugin } = webpack, bundlerChain = await helpers.modifyBundlerChain(context, {
|
|
170
170
|
...chainUtils,
|
|
171
171
|
bundler: {
|
|
172
172
|
BannerPlugin,
|
|
173
173
|
DefinePlugin,
|
|
174
174
|
IgnorePlugin,
|
|
175
175
|
ProvidePlugin,
|
|
176
|
+
SourceMapDevToolPlugin,
|
|
176
177
|
HotModuleReplacementPlugin
|
|
177
178
|
}
|
|
178
|
-
}),
|
|
179
|
+
}), webpackConfig = (await modifyWebpackChain(context, chainUtils, bundlerChain)).toConfig(), configUtils = await helpers.getConfigUtils(webpackConfig, chainUtils);
|
|
179
180
|
return await modifyWebpackConfig(context, webpackConfig, configUtils);
|
|
180
181
|
}
|
|
181
182
|
async function initConfigs({ context, pluginManager, rsbuildOptions, helpers }) {
|
|
@@ -314,7 +315,7 @@ let getMainFields = (chain, target)=>{
|
|
|
314
315
|
if (progress) {
|
|
315
316
|
let { ProgressPlugin } = await Promise.all([
|
|
316
317
|
__webpack_require__.e("997"),
|
|
317
|
-
__webpack_require__.e("
|
|
318
|
+
__webpack_require__.e("301")
|
|
318
319
|
]).then(__webpack_require__.bind(__webpack_require__, "./src/progress/ProgressPlugin.ts"));
|
|
319
320
|
chain.plugin(CHAIN_ID.PLUGIN.PROGRESS).use(ProgressPlugin, [
|
|
320
321
|
{
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RsbuildPlugin, RsbuildProviderHelpers } from '@rsbuild/core';
|
|
2
2
|
/**
|
|
3
|
-
* Handling differences between
|
|
3
|
+
* Handling differences between webpack and Rspack
|
|
4
4
|
*/
|
|
5
5
|
export declare const pluginAdaptor: (helpers: RsbuildProviderHelpers) => RsbuildPlugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/webpack",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"homepage": "https://rsbuild.dev",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"webpack": "^5.97.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@rslib/core": "0.
|
|
36
|
-
"@types/node": "^22.
|
|
35
|
+
"@rslib/core": "0.4.0",
|
|
36
|
+
"@types/node": "^22.13.0",
|
|
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
|
-
"@
|
|
42
|
-
"@
|
|
41
|
+
"@rsbuild/core": "1.2.4",
|
|
42
|
+
"@scripts/test-helper": "1.0.1"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@rsbuild/core": "^1.1.3"
|