@rsbuild/webpack 1.1.5 → 1.1.6
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/index.cjs +8 -3
- package/dist/index.js +5 -3
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -19,6 +19,9 @@ var __webpack_modules__ = {
|
|
|
19
19
|
"copy-webpack-plugin": function(module) {
|
|
20
20
|
module.exports = import("copy-webpack-plugin");
|
|
21
21
|
},
|
|
22
|
+
"html-webpack-plugin": function(module) {
|
|
23
|
+
module.exports = import("html-webpack-plugin");
|
|
24
|
+
},
|
|
22
25
|
"mini-css-extract-plugin": function(module) {
|
|
23
26
|
module.exports = import("mini-css-extract-plugin");
|
|
24
27
|
},
|
|
@@ -219,7 +222,6 @@ async function initConfigs({ context, pluginManager, rsbuildOptions, helpers })
|
|
|
219
222
|
};
|
|
220
223
|
}
|
|
221
224
|
async function createCompiler_createCompiler(options) {
|
|
222
|
-
var _context_normalizedConfig;
|
|
223
225
|
core_.logger.debug('create compiler');
|
|
224
226
|
let { helpers, context } = options, { webpackConfigs } = await initConfigs(options);
|
|
225
227
|
await context.hooks.onBeforeCreateCompiler.call({
|
|
@@ -237,7 +239,7 @@ async function createCompiler_createCompiler(options) {
|
|
|
237
239
|
};
|
|
238
240
|
return compiler.hooks.done.tap('rsbuild:done', (stats)=>{
|
|
239
241
|
done(stats);
|
|
240
|
-
}),
|
|
242
|
+
}), 'dev' === context.command && helpers.registerDevHook({
|
|
241
243
|
compiler,
|
|
242
244
|
context,
|
|
243
245
|
bundlerConfigs: webpackConfigs,
|
|
@@ -354,7 +356,10 @@ let getMainFields = (chain, target)=>{
|
|
|
354
356
|
}
|
|
355
357
|
}), webpackProvider = async ({ context, pluginManager, rsbuildOptions, helpers })=>{
|
|
356
358
|
let { default: cssExtractPlugin } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "mini-css-extract-plugin"));
|
|
357
|
-
helpers.setCssExtractPlugin(cssExtractPlugin)
|
|
359
|
+
if (helpers.setCssExtractPlugin(cssExtractPlugin), helpers.setHTMLPlugin) {
|
|
360
|
+
let { default: htmlPlugin } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "html-webpack-plugin"));
|
|
361
|
+
helpers.setHTMLPlugin(htmlPlugin);
|
|
362
|
+
}
|
|
358
363
|
let createCompiler = async ()=>(await createCompiler_createCompiler({
|
|
359
364
|
context,
|
|
360
365
|
pluginManager,
|
package/dist/index.js
CHANGED
|
@@ -214,7 +214,6 @@ async function initConfigs({ context, pluginManager, rsbuildOptions, helpers })
|
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
216
|
async function createCompiler_createCompiler(options) {
|
|
217
|
-
var _context_normalizedConfig;
|
|
218
217
|
core_.logger.debug('create compiler');
|
|
219
218
|
let { helpers, context } = options, { webpackConfigs } = await initConfigs(options);
|
|
220
219
|
await context.hooks.onBeforeCreateCompiler.call({
|
|
@@ -232,7 +231,7 @@ async function createCompiler_createCompiler(options) {
|
|
|
232
231
|
};
|
|
233
232
|
return compiler.hooks.done.tap('rsbuild:done', (stats)=>{
|
|
234
233
|
done(stats);
|
|
235
|
-
}),
|
|
234
|
+
}), 'dev' === context.command && helpers.registerDevHook({
|
|
236
235
|
compiler,
|
|
237
236
|
context,
|
|
238
237
|
bundlerConfigs: webpackConfigs,
|
|
@@ -347,7 +346,10 @@ let getMainFields = (chain, target)=>{
|
|
|
347
346
|
}
|
|
348
347
|
}), webpackProvider = async ({ context, pluginManager, rsbuildOptions, helpers })=>{
|
|
349
348
|
let { default: cssExtractPlugin } = await import("mini-css-extract-plugin");
|
|
350
|
-
helpers.setCssExtractPlugin(cssExtractPlugin)
|
|
349
|
+
if (helpers.setCssExtractPlugin(cssExtractPlugin), helpers.setHTMLPlugin) {
|
|
350
|
+
let { default: htmlPlugin } = await import("html-webpack-plugin");
|
|
351
|
+
helpers.setHTMLPlugin(htmlPlugin);
|
|
352
|
+
}
|
|
351
353
|
let createCompiler = async ()=>(await createCompiler_createCompiler({
|
|
352
354
|
context,
|
|
353
355
|
pluginManager,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/webpack",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"homepage": "https://rsbuild.dev",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"copy-webpack-plugin": "11.0.0",
|
|
27
|
+
"html-webpack-plugin": "^5.6.3",
|
|
27
28
|
"mini-css-extract-plugin": "2.9.2",
|
|
28
29
|
"picocolors": "^1.1.1",
|
|
29
30
|
"reduce-configs": "^1.1.0",
|
|
@@ -37,7 +38,7 @@
|
|
|
37
38
|
"cli-truncate": "2.1.0",
|
|
38
39
|
"patch-console": "1.0.0",
|
|
39
40
|
"typescript": "^5.7.2",
|
|
40
|
-
"@rsbuild/core": "1.1.
|
|
41
|
+
"@rsbuild/core": "1.1.10",
|
|
41
42
|
"@scripts/test-helper": "1.0.1"
|
|
42
43
|
},
|
|
43
44
|
"peerDependencies": {
|