@rsbuild/core 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/compiled/css-loader/index.js +22 -22
- package/compiled/html-rspack-plugin/index.js +14 -14
- package/compiled/postcss-loader/index.js +8 -8
- package/compiled/rspack-manifest-plugin/index.js +4 -4
- package/dist/index.cjs +23 -12
- package/dist/index.js +22 -11
- package/dist-types/hooks.d.ts +2 -1
- package/dist-types/types/hooks.d.ts +1 -0
- package/dist-types/types/plugin.d.ts +2 -1
- package/dist-types/types/rsbuild.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
4377: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const loader = __nccwpck_require__(
|
|
5
|
+
const loader = __nccwpck_require__(7258);
|
|
6
6
|
module.exports = loader.default;
|
|
7
7
|
module.exports.defaultGetLocalIdent =
|
|
8
|
-
__nccwpck_require__(
|
|
8
|
+
__nccwpck_require__(7409).defaultGetLocalIdent;
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
7258: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
11
11
|
"use strict";
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports["default"] = loader;
|
|
14
14
|
var _postcss = _interopRequireDefault(__nccwpck_require__(9961));
|
|
15
15
|
var _package = _interopRequireDefault(__nccwpck_require__(7337));
|
|
16
16
|
var _semver = { satisfies: () => true };
|
|
17
|
-
var _options = _interopRequireDefault(__nccwpck_require__(
|
|
18
|
-
var _plugins = __nccwpck_require__(
|
|
19
|
-
var _utils = __nccwpck_require__(
|
|
17
|
+
var _options = _interopRequireDefault(__nccwpck_require__(5259));
|
|
18
|
+
var _plugins = __nccwpck_require__(1514);
|
|
19
|
+
var _utils = __nccwpck_require__(7409);
|
|
20
20
|
function _interopRequireDefault(obj) {
|
|
21
21
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
22
22
|
}
|
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
callback(null, `${importCode}${moduleCode}${exportCode}`);
|
|
244
244
|
}
|
|
245
245
|
},
|
|
246
|
-
|
|
246
|
+
1514: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
247
247
|
"use strict";
|
|
248
248
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
249
249
|
Object.defineProperty(exports, "icssParser", {
|
|
@@ -265,22 +265,22 @@
|
|
|
265
265
|
},
|
|
266
266
|
});
|
|
267
267
|
var _postcssImportParser = _interopRequireDefault(
|
|
268
|
-
__nccwpck_require__(
|
|
268
|
+
__nccwpck_require__(5856),
|
|
269
269
|
);
|
|
270
270
|
var _postcssIcssParser = _interopRequireDefault(
|
|
271
|
-
__nccwpck_require__(
|
|
271
|
+
__nccwpck_require__(5603),
|
|
272
272
|
);
|
|
273
|
-
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(
|
|
273
|
+
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(5710));
|
|
274
274
|
function _interopRequireDefault(obj) {
|
|
275
275
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
|
-
|
|
278
|
+
5603: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
279
279
|
"use strict";
|
|
280
280
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
281
281
|
exports["default"] = void 0;
|
|
282
282
|
var _icssUtils = __nccwpck_require__(4508);
|
|
283
|
-
var _utils = __nccwpck_require__(
|
|
283
|
+
var _utils = __nccwpck_require__(7409);
|
|
284
284
|
const plugin = (options = {}) => ({
|
|
285
285
|
postcssPlugin: "postcss-icss-parser",
|
|
286
286
|
async OnceExit(root) {
|
|
@@ -379,14 +379,14 @@
|
|
|
379
379
|
plugin.postcss = true;
|
|
380
380
|
var _default = (exports["default"] = plugin);
|
|
381
381
|
},
|
|
382
|
-
|
|
382
|
+
5856: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
383
383
|
"use strict";
|
|
384
384
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
385
385
|
exports["default"] = void 0;
|
|
386
386
|
var _postcssValueParser = _interopRequireDefault(
|
|
387
387
|
__nccwpck_require__(7555),
|
|
388
388
|
);
|
|
389
|
-
var _utils = __nccwpck_require__(
|
|
389
|
+
var _utils = __nccwpck_require__(7409);
|
|
390
390
|
function _interopRequireDefault(obj) {
|
|
391
391
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
392
392
|
}
|
|
@@ -691,14 +691,14 @@
|
|
|
691
691
|
plugin.postcss = true;
|
|
692
692
|
var _default = (exports["default"] = plugin);
|
|
693
693
|
},
|
|
694
|
-
|
|
694
|
+
5710: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
695
695
|
"use strict";
|
|
696
696
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
697
697
|
exports["default"] = void 0;
|
|
698
698
|
var _postcssValueParser = _interopRequireDefault(
|
|
699
699
|
__nccwpck_require__(7555),
|
|
700
700
|
);
|
|
701
|
-
var _utils = __nccwpck_require__(
|
|
701
|
+
var _utils = __nccwpck_require__(7409);
|
|
702
702
|
function _interopRequireDefault(obj) {
|
|
703
703
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
704
704
|
}
|
|
@@ -1041,7 +1041,7 @@
|
|
|
1041
1041
|
plugin.postcss = true;
|
|
1042
1042
|
var _default = (exports["default"] = plugin);
|
|
1043
1043
|
},
|
|
1044
|
-
|
|
1044
|
+
7409: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
1045
1045
|
"use strict";
|
|
1046
1046
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1047
1047
|
exports.WEBPACK_IGNORE_COMMENT_REGEXP = void 0;
|
|
@@ -7393,13 +7393,13 @@
|
|
|
7393
7393
|
exports.getProp = _getProp["default"];
|
|
7394
7394
|
var _ensureObject = _interopRequireDefault(__nccwpck_require__(8537));
|
|
7395
7395
|
exports.ensureObject = _ensureObject["default"];
|
|
7396
|
-
var _stripComments = _interopRequireDefault(__nccwpck_require__(
|
|
7396
|
+
var _stripComments = _interopRequireDefault(__nccwpck_require__(1937));
|
|
7397
7397
|
exports.stripComments = _stripComments["default"];
|
|
7398
7398
|
function _interopRequireDefault(obj) {
|
|
7399
7399
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
7400
7400
|
}
|
|
7401
7401
|
},
|
|
7402
|
-
|
|
7402
|
+
1937: (module, exports) => {
|
|
7403
7403
|
"use strict";
|
|
7404
7404
|
exports.__esModule = true;
|
|
7405
7405
|
exports["default"] = stripComments;
|
|
@@ -7968,7 +7968,7 @@
|
|
|
7968
7968
|
"use strict";
|
|
7969
7969
|
module.exports = require("util");
|
|
7970
7970
|
},
|
|
7971
|
-
|
|
7971
|
+
5259: (module) => {
|
|
7972
7972
|
"use strict";
|
|
7973
7973
|
module.exports = JSON.parse(
|
|
7974
7974
|
'{"title":"CSS Loader options","additionalProperties":false,"properties":{"url":{"description":"Allows to enables/disables `url()`/`image-set()` functions handling.","link":"https://github.com/webpack-contrib/css-loader#url","anyOf":[{"type":"boolean"},{"type":"object","properties":{"filter":{"instanceof":"Function"}},"additionalProperties":false}]},"import":{"description":"Allows to enables/disables `@import` at-rules handling.","link":"https://github.com/webpack-contrib/css-loader#import","anyOf":[{"type":"boolean"},{"type":"object","properties":{"filter":{"instanceof":"Function"}},"additionalProperties":false}]},"modules":{"description":"Allows to enable/disable CSS Modules or ICSS and setup configuration.","link":"https://github.com/webpack-contrib/css-loader#modules","anyOf":[{"type":"boolean"},{"enum":["local","global","pure","icss"]},{"type":"object","additionalProperties":false,"properties":{"auto":{"description":"Allows auto enable CSS modules based on filename.","link":"https://github.com/webpack-contrib/css-loader#auto","anyOf":[{"instanceof":"RegExp"},{"instanceof":"Function"},{"type":"boolean"}]},"mode":{"description":"Setup `mode` option.","link":"https://github.com/webpack-contrib/css-loader#mode","anyOf":[{"enum":["local","global","pure","icss"]},{"instanceof":"Function"}]},"localIdentName":{"description":"Allows to configure the generated local ident name.","link":"https://github.com/webpack-contrib/css-loader#localidentname","type":"string","minLength":1},"localIdentContext":{"description":"Allows to redefine basic loader context for local ident name.","link":"https://github.com/webpack-contrib/css-loader#localidentcontext","type":"string","minLength":1},"localIdentHashSalt":{"description":"Allows to add custom hash to generate more unique classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashsalt","type":"string","minLength":1},"localIdentHashFunction":{"description":"Allows to specify hash function to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashfunction","type":"string","minLength":1},"localIdentHashDigest":{"description":"Allows to specify hash digest to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashdigest","type":"string","minLength":1},"localIdentHashDigestLength":{"description":"Allows to specify hash digest length to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashdigestlength","type":"number"},"hashStrategy":{"description":"Allows to specify should localName be used when computing the hash.","link":"https://github.com/webpack-contrib/css-loader#hashstrategy","enum":["resource-path-and-local-name","minimal-subset"]},"localIdentRegExp":{"description":"Allows to specify custom RegExp for local ident name.","link":"https://github.com/webpack-contrib/css-loader#localidentregexp","anyOf":[{"type":"string","minLength":1},{"instanceof":"RegExp"}]},"getLocalIdent":{"description":"Allows to specify a function to generate the classname.","link":"https://github.com/webpack-contrib/css-loader#getlocalident","instanceof":"Function"},"namedExport":{"description":"Enables/disables ES modules named export for locals.","link":"https://github.com/webpack-contrib/css-loader#namedexport","type":"boolean"},"exportGlobals":{"description":"Allows to export names from global class or id, so you can use that as local name.","link":"https://github.com/webpack-contrib/css-loader#exportglobals","type":"boolean"},"exportLocalsConvention":{"description":"Style of exported classnames.","link":"https://github.com/webpack-contrib/css-loader#localsconvention","anyOf":[{"enum":["asIs","as-is","camelCase","camel-case","camelCaseOnly","camel-case-only","dashes","dashesOnly","dashes-only"]},{"instanceof":"Function"}]},"exportOnlyLocals":{"description":"Export only locals.","link":"https://github.com/webpack-contrib/css-loader#exportonlylocals","type":"boolean"},"getJSON":{"description":"Allows outputting of CSS modules mapping through a callback.","link":"https://github.com/webpack-contrib/css-loader#getJSON","instanceof":"Function"}}}]},"sourceMap":{"description":"Allows to enable/disable source maps.","link":"https://github.com/webpack-contrib/css-loader#sourcemap","type":"boolean"},"importLoaders":{"description":"Allows enables/disables or setups number of loaders applied before CSS loader for `@import`/CSS Modules and ICSS imports.","link":"https://github.com/webpack-contrib/css-loader#importloaders","anyOf":[{"type":"boolean"},{"type":"string"},{"type":"integer"}]},"esModule":{"description":"Use the ES modules syntax.","link":"https://github.com/webpack-contrib/css-loader#esmodule","type":"boolean"},"exportType":{"description":"Allows exporting styles as array with modules, string or constructable stylesheet (i.e. `CSSStyleSheet`).","link":"https://github.com/webpack-contrib/css-loader#exporttype","enum":["array","string","css-style-sheet"]}},"type":"object"}',
|
|
@@ -8003,6 +8003,6 @@
|
|
|
8003
8003
|
}
|
|
8004
8004
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
8005
8005
|
__nccwpck_require__.ab = __dirname + "/";
|
|
8006
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
8006
|
+
var __webpack_exports__ = __nccwpck_require__(4377);
|
|
8007
8007
|
module.exports = __webpack_exports__;
|
|
8008
8008
|
})();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
804: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const { HtmlWebpackChildCompiler } = __nccwpck_require__(
|
|
5
|
+
const { HtmlWebpackChildCompiler } = __nccwpck_require__(954);
|
|
6
6
|
const compilerMap = new WeakMap();
|
|
7
7
|
class CachedChildCompilation {
|
|
8
8
|
constructor(compiler) {
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
}
|
|
305
305
|
module.exports = { CachedChildCompilation };
|
|
306
306
|
},
|
|
307
|
-
|
|
307
|
+
954: (module) => {
|
|
308
308
|
"use strict";
|
|
309
309
|
class HtmlWebpackChildCompiler {
|
|
310
310
|
constructor(templates) {
|
|
@@ -473,7 +473,7 @@
|
|
|
473
473
|
}
|
|
474
474
|
module.exports = { HtmlWebpackChildCompiler };
|
|
475
475
|
},
|
|
476
|
-
|
|
476
|
+
560: (module) => {
|
|
477
477
|
"use strict";
|
|
478
478
|
module.exports = {};
|
|
479
479
|
module.exports.none = (chunks) => chunks;
|
|
@@ -492,7 +492,7 @@
|
|
|
492
492
|
};
|
|
493
493
|
module.exports.auto = module.exports.none;
|
|
494
494
|
},
|
|
495
|
-
|
|
495
|
+
295: (module) => {
|
|
496
496
|
"use strict";
|
|
497
497
|
module.exports = function (err) {
|
|
498
498
|
return {
|
|
@@ -513,7 +513,7 @@
|
|
|
513
513
|
};
|
|
514
514
|
};
|
|
515
515
|
},
|
|
516
|
-
|
|
516
|
+
171: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
517
517
|
"use strict";
|
|
518
518
|
const { AsyncSeriesWaterfallHook } = __nccwpck_require__(348);
|
|
519
519
|
const htmlWebpackPluginHooksMap = new WeakMap();
|
|
@@ -539,7 +539,7 @@
|
|
|
539
539
|
}
|
|
540
540
|
module.exports = { getHtmlRspackPluginHooks };
|
|
541
541
|
},
|
|
542
|
-
|
|
542
|
+
585: (module) => {
|
|
543
543
|
const voidTags = [
|
|
544
544
|
"area",
|
|
545
545
|
"base",
|
|
@@ -607,19 +607,19 @@
|
|
|
607
607
|
htmlTagObjectToString,
|
|
608
608
|
};
|
|
609
609
|
},
|
|
610
|
-
|
|
610
|
+
190: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
611
611
|
"use strict";
|
|
612
612
|
const promisify = __nccwpck_require__(837).promisify;
|
|
613
613
|
const vm = __nccwpck_require__(144);
|
|
614
614
|
const fs = __nccwpck_require__(147);
|
|
615
615
|
const path = __nccwpck_require__(17);
|
|
616
|
-
const { CachedChildCompilation } = __nccwpck_require__(
|
|
616
|
+
const { CachedChildCompilation } = __nccwpck_require__(804);
|
|
617
617
|
const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } =
|
|
618
|
-
__nccwpck_require__(
|
|
619
|
-
const prettyError = __nccwpck_require__(
|
|
620
|
-
const chunkSorter = __nccwpck_require__(
|
|
618
|
+
__nccwpck_require__(585);
|
|
619
|
+
const prettyError = __nccwpck_require__(295);
|
|
620
|
+
const chunkSorter = __nccwpck_require__(560);
|
|
621
621
|
const getHtmlRspackPluginHooks =
|
|
622
|
-
__nccwpck_require__(
|
|
622
|
+
__nccwpck_require__(171).getHtmlRspackPluginHooks;
|
|
623
623
|
class HtmlRspackPlugin {
|
|
624
624
|
constructor(userOptions = {}) {
|
|
625
625
|
this.version = HtmlRspackPlugin.version;
|
|
@@ -1578,6 +1578,6 @@
|
|
|
1578
1578
|
}
|
|
1579
1579
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
1580
1580
|
__nccwpck_require__.ab = __dirname + "/";
|
|
1581
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
1581
|
+
var __webpack_exports__ = __nccwpck_require__(190);
|
|
1582
1582
|
module.exports = __webpack_exports__;
|
|
1583
1583
|
})();
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
5
|
-
module.exports = __nccwpck_require__(
|
|
4
|
+
388: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
module.exports = __nccwpck_require__(516)["default"];
|
|
6
6
|
},
|
|
7
|
-
|
|
7
|
+
516: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
8
8
|
var __webpack_unused_export__;
|
|
9
9
|
__webpack_unused_export__ = { value: true };
|
|
10
10
|
exports["default"] = loader;
|
|
11
11
|
var _path = _interopRequireDefault(__nccwpck_require__(17));
|
|
12
12
|
var _package = _interopRequireDefault(__nccwpck_require__(337));
|
|
13
|
-
var _options = _interopRequireDefault(__nccwpck_require__(
|
|
14
|
-
var _utils = __nccwpck_require__(
|
|
13
|
+
var _options = _interopRequireDefault(__nccwpck_require__(576));
|
|
14
|
+
var _utils = __nccwpck_require__(593);
|
|
15
15
|
function _interopRequireDefault(obj) {
|
|
16
16
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
17
17
|
}
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
callback(null, result.css, map, { ast });
|
|
190
190
|
}
|
|
191
191
|
},
|
|
192
|
-
|
|
192
|
+
593: (module, exports, __nccwpck_require__) => {
|
|
193
193
|
module = __nccwpck_require__.nmd(module);
|
|
194
194
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
195
195
|
exports.exec = exec;
|
|
@@ -691,7 +691,7 @@
|
|
|
691
691
|
310: (module) => {
|
|
692
692
|
module.exports = require("url");
|
|
693
693
|
},
|
|
694
|
-
|
|
694
|
+
576: (module) => {
|
|
695
695
|
module.exports = JSON.parse(
|
|
696
696
|
'{"title":"PostCSS Loader options","type":"object","properties":{"postcssOptions":{"description":"Options to pass through to `Postcss`.","link":"https://github.com/webpack-contrib/postcss-loader#postcssOptions","anyOf":[{"type":"object","additionalProperties":true,"properties":{"config":{"description":"Allows to specify PostCSS config path.","link":"https://github.com/webpack-contrib/postcss-loader#config","anyOf":[{"description":"Allows to specify the path to the configuration file","type":"string"},{"description":"Enables/Disables autoloading config","type":"boolean"}]}}},{"instanceof":"Function"}]},"execute":{"description":"Enables/Disables PostCSS parser support in \'CSS-in-JS\'.","link":"https://github.com/webpack-contrib/postcss-loader#execute","type":"boolean"},"sourceMap":{"description":"Enables/Disables generation of source maps.","link":"https://github.com/webpack-contrib/postcss-loader#sourcemap","type":"boolean"},"implementation":{"description":"The implementation of postcss to use, instead of the locally installed version","link":"https://github.com/webpack-contrib/postcss-loader#implementation","anyOf":[{"type":"string"},{"instanceof":"Function"}]}},"additionalProperties":false}',
|
|
697
697
|
);
|
|
@@ -736,6 +736,6 @@
|
|
|
736
736
|
})();
|
|
737
737
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
738
738
|
__nccwpck_require__.ab = __dirname + "/";
|
|
739
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
739
|
+
var __webpack_exports__ = __nccwpck_require__(388);
|
|
740
740
|
module.exports = __webpack_exports__;
|
|
741
741
|
})();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
4
|
+
953: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.transformFiles =
|
|
7
7
|
exports.reduceChunk =
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
.map(standardizeFilePaths);
|
|
121
121
|
exports.transformFiles = transformFiles;
|
|
122
122
|
},
|
|
123
|
-
|
|
123
|
+
362: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
124
124
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
125
125
|
exports.normalModuleLoaderHook =
|
|
126
126
|
exports.getCompilerHooks =
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
const fs_1 = __nccwpck_require__(147);
|
|
131
131
|
const path_1 = __nccwpck_require__(17);
|
|
132
132
|
const lite_tapable_1 = __nccwpck_require__(348);
|
|
133
|
-
const helpers_1 = __nccwpck_require__(
|
|
133
|
+
const helpers_1 = __nccwpck_require__(953);
|
|
134
134
|
const compilerHookMap = new WeakMap();
|
|
135
135
|
const getCompilerHooks = (compiler) => {
|
|
136
136
|
let hooks = compilerHookMap.get(compiler);
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
exports.getCompilerHooks =
|
|
313
313
|
void 0;
|
|
314
314
|
const path_1 = __nccwpck_require__(17);
|
|
315
|
-
const hooks_1 = __nccwpck_require__(
|
|
315
|
+
const hooks_1 = __nccwpck_require__(362);
|
|
316
316
|
Object.defineProperty(exports, "getCompilerHooks", {
|
|
317
317
|
enumerable: true,
|
|
318
318
|
get: function () {
|
package/dist/index.cjs
CHANGED
|
@@ -2721,7 +2721,7 @@ var __webpack_exports__ = {};
|
|
|
2721
2721
|
async function createContext(options, userConfig, bundlerType) {
|
|
2722
2722
|
let { cwd } = options, rootPath = userConfig.root ? getAbsolutePath(cwd, userConfig.root) : cwd, rsbuildConfig = await withDefaultConfig(rootPath, userConfig), cachePath = (0, external_node_path_.join)(rootPath, 'node_modules', '.cache');
|
|
2723
2723
|
return {
|
|
2724
|
-
version: "1.1.
|
|
2724
|
+
version: "1.1.6",
|
|
2725
2725
|
rootPath,
|
|
2726
2726
|
distPath: '',
|
|
2727
2727
|
cachePath,
|
|
@@ -2729,6 +2729,7 @@ var __webpack_exports__ = {};
|
|
|
2729
2729
|
environments: {},
|
|
2730
2730
|
hooks: {
|
|
2731
2731
|
onExit: createAsyncHook(),
|
|
2732
|
+
onCloseBuild: createAsyncHook(),
|
|
2732
2733
|
onAfterBuild: createAsyncHook(),
|
|
2733
2734
|
onBeforeBuild: createAsyncHook(),
|
|
2734
2735
|
onDevCompileDone: createAsyncHook(),
|
|
@@ -2915,6 +2916,9 @@ var __webpack_exports__ = {};
|
|
|
2915
2916
|
infrastructureLogging: {
|
|
2916
2917
|
level: 'error'
|
|
2917
2918
|
}
|
|
2919
|
+
}), chain.watchOptions({
|
|
2920
|
+
ignored: /[\\/](?:\.git|node_modules)[\\/]/,
|
|
2921
|
+
aggregateTimeout: 0
|
|
2918
2922
|
}), chain.performance.hints(!1), chain.module.parser.merge({
|
|
2919
2923
|
javascript: {
|
|
2920
2924
|
exportsPresence: 'error'
|
|
@@ -3316,7 +3320,7 @@ var __webpack_exports__ = {};
|
|
|
3316
3320
|
], defaultConfig = {
|
|
3317
3321
|
total: !0,
|
|
3318
3322
|
detail: !0,
|
|
3319
|
-
compressed:
|
|
3323
|
+
compressed: 'node' !== environment.config.output.target
|
|
3320
3324
|
}, mergedConfig = !0 === printFileSize ? defaultConfig : {
|
|
3321
3325
|
...defaultConfig,
|
|
3322
3326
|
...printFileSize
|
|
@@ -6383,11 +6387,7 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
6383
6387
|
});
|
|
6384
6388
|
return {
|
|
6385
6389
|
stats,
|
|
6386
|
-
close:
|
|
6387
|
-
compiler.close(()=>{
|
|
6388
|
-
resolve();
|
|
6389
|
-
});
|
|
6390
|
-
})
|
|
6390
|
+
close: async ()=>{}
|
|
6391
6391
|
};
|
|
6392
6392
|
}, rspackProvider = async ({ context, pluginManager, rsbuildOptions })=>{
|
|
6393
6393
|
let createCompiler = async ()=>(await createCompiler_createCompiler({
|
|
@@ -6853,6 +6853,7 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
6853
6853
|
isPluginExists: pluginManager.isPluginExists,
|
|
6854
6854
|
onExit,
|
|
6855
6855
|
onAfterBuild: hooks.onAfterBuild.tap,
|
|
6856
|
+
onCloseBuild: hooks.onCloseBuild.tap,
|
|
6856
6857
|
onBeforeBuild: hooks.onBeforeBuild.tap,
|
|
6857
6858
|
onCloseDevServer: hooks.onCloseDevServer.tap,
|
|
6858
6859
|
onDevCompileDone: hooks.onDevCompileDone.tap,
|
|
@@ -6922,8 +6923,17 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
6922
6923
|
}(distPath)) throw Error(`The output directory ${index_js_default().yellow(distPath)} is empty, please build the project before previewing.`);
|
|
6923
6924
|
}
|
|
6924
6925
|
return startProdServer(context, config, options);
|
|
6926
|
+
}, build = async (...args)=>{
|
|
6927
|
+
!getNodeEnv() && setNodeEnv('production');
|
|
6928
|
+
let buildInstance = await providerInstance.build(...args);
|
|
6929
|
+
return {
|
|
6930
|
+
...buildInstance,
|
|
6931
|
+
close: async ()=>{
|
|
6932
|
+
await context.hooks.onCloseBuild.call(), await buildInstance.close();
|
|
6933
|
+
}
|
|
6934
|
+
};
|
|
6925
6935
|
}, rsbuild = {
|
|
6926
|
-
build
|
|
6936
|
+
build,
|
|
6927
6937
|
preview,
|
|
6928
6938
|
startDevServer: (...args)=>(!getNodeEnv() && setNodeEnv('development'), providerInstance.startDevServer(...args)),
|
|
6929
6939
|
createDevServer: (...args)=>(!getNodeEnv() && setNodeEnv('development'), providerInstance.createDevServer(...args)),
|
|
@@ -6935,6 +6945,7 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
6935
6945
|
]),
|
|
6936
6946
|
...pick(globalPluginAPI, [
|
|
6937
6947
|
'context',
|
|
6948
|
+
'onCloseBuild',
|
|
6938
6949
|
'onBeforeBuild',
|
|
6939
6950
|
'onBeforeCreateCompiler',
|
|
6940
6951
|
'onBeforeStartDevServer',
|
|
@@ -6991,11 +7002,11 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
6991
7002
|
}
|
|
6992
7003
|
}();
|
|
6993
7004
|
let { npm_execpath } = process.env;
|
|
6994
|
-
(!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), rslog_index_js_namespaceObject.logger.greet(` Rsbuild v1.1.
|
|
7005
|
+
(!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), rslog_index_js_namespaceObject.logger.greet(` Rsbuild v1.1.6\n`);
|
|
6995
7006
|
}();
|
|
6996
7007
|
try {
|
|
6997
7008
|
!function() {
|
|
6998
|
-
program.name('rsbuild').usage('<command> [options]').version("1.1.
|
|
7009
|
+
program.name('rsbuild').usage('<command> [options]').version("1.1.6");
|
|
6999
7010
|
let devCommand = program.command('dev'), buildCommand = program.command('build'), previewCommand = program.command('preview'), inspectCommand = program.command('inspect');
|
|
7000
7011
|
[
|
|
7001
7012
|
devCommand,
|
|
@@ -7054,10 +7065,10 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
7054
7065
|
rslog_index_js_namespaceObject.logger.error('Failed to start Rsbuild CLI.'), rslog_index_js_namespaceObject.logger.error(err);
|
|
7055
7066
|
}
|
|
7056
7067
|
}
|
|
7057
|
-
let src_rslib_entry_version = "1.1.
|
|
7068
|
+
let src_rslib_entry_version = "1.1.6";
|
|
7058
7069
|
})();
|
|
7059
7070
|
var __webpack_export_target__ = exports;
|
|
7060
|
-
for(var
|
|
7071
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
7061
7072
|
__webpack_exports__.__esModule && Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
7062
7073
|
value: !0
|
|
7063
7074
|
});
|
package/dist/index.js
CHANGED
|
@@ -2631,7 +2631,7 @@ async function updateEnvironmentContext(context, configs) {
|
|
|
2631
2631
|
async function createContext(options, userConfig, bundlerType) {
|
|
2632
2632
|
let { cwd } = options, rootPath = userConfig.root ? getAbsolutePath(cwd, userConfig.root) : cwd, rsbuildConfig = await withDefaultConfig(rootPath, userConfig), cachePath = (0, external_node_path_.join)(rootPath, 'node_modules', '.cache');
|
|
2633
2633
|
return {
|
|
2634
|
-
version: "1.1.
|
|
2634
|
+
version: "1.1.6",
|
|
2635
2635
|
rootPath,
|
|
2636
2636
|
distPath: '',
|
|
2637
2637
|
cachePath,
|
|
@@ -2639,6 +2639,7 @@ async function createContext(options, userConfig, bundlerType) {
|
|
|
2639
2639
|
environments: {},
|
|
2640
2640
|
hooks: {
|
|
2641
2641
|
onExit: createAsyncHook(),
|
|
2642
|
+
onCloseBuild: createAsyncHook(),
|
|
2642
2643
|
onAfterBuild: createAsyncHook(),
|
|
2643
2644
|
onBeforeBuild: createAsyncHook(),
|
|
2644
2645
|
onDevCompileDone: createAsyncHook(),
|
|
@@ -2825,6 +2826,9 @@ let pluginAppIcon = ()=>({
|
|
|
2825
2826
|
infrastructureLogging: {
|
|
2826
2827
|
level: 'error'
|
|
2827
2828
|
}
|
|
2829
|
+
}), chain.watchOptions({
|
|
2830
|
+
ignored: /[\\/](?:\.git|node_modules)[\\/]/,
|
|
2831
|
+
aggregateTimeout: 0
|
|
2828
2832
|
}), chain.performance.hints(!1), chain.module.parser.merge({
|
|
2829
2833
|
javascript: {
|
|
2830
2834
|
exportsPresence: 'error'
|
|
@@ -3223,7 +3227,7 @@ let pluginFileSize = ()=>({
|
|
|
3223
3227
|
], defaultConfig = {
|
|
3224
3228
|
total: !0,
|
|
3225
3229
|
detail: !0,
|
|
3226
|
-
compressed:
|
|
3230
|
+
compressed: 'node' !== environment.config.output.target
|
|
3227
3231
|
}, mergedConfig = !0 === printFileSize ? defaultConfig : {
|
|
3228
3232
|
...defaultConfig,
|
|
3229
3233
|
...printFileSize
|
|
@@ -6274,11 +6278,7 @@ let build_build = async (initOptions, { watch, compiler: customCompiler } = {})=
|
|
|
6274
6278
|
});
|
|
6275
6279
|
return {
|
|
6276
6280
|
stats,
|
|
6277
|
-
close:
|
|
6278
|
-
compiler.close(()=>{
|
|
6279
|
-
resolve();
|
|
6280
|
-
});
|
|
6281
|
-
})
|
|
6281
|
+
close: async ()=>{}
|
|
6282
6282
|
};
|
|
6283
6283
|
}, rspackProvider = async ({ context, pluginManager, rsbuildOptions })=>{
|
|
6284
6284
|
let createCompiler = async ()=>(await createCompiler_createCompiler({
|
|
@@ -6744,6 +6744,7 @@ async function createRsbuild(options = {}) {
|
|
|
6744
6744
|
isPluginExists: pluginManager.isPluginExists,
|
|
6745
6745
|
onExit,
|
|
6746
6746
|
onAfterBuild: hooks.onAfterBuild.tap,
|
|
6747
|
+
onCloseBuild: hooks.onCloseBuild.tap,
|
|
6747
6748
|
onBeforeBuild: hooks.onBeforeBuild.tap,
|
|
6748
6749
|
onCloseDevServer: hooks.onCloseDevServer.tap,
|
|
6749
6750
|
onDevCompileDone: hooks.onDevCompileDone.tap,
|
|
@@ -6813,8 +6814,17 @@ async function createRsbuild(options = {}) {
|
|
|
6813
6814
|
}(distPath)) throw Error(`The output directory ${__WEBPACK_EXTERNAL_MODULE__compiled_picocolors_index_js__.default.yellow(distPath)} is empty, please build the project before previewing.`);
|
|
6814
6815
|
}
|
|
6815
6816
|
return startProdServer(context, config, options);
|
|
6817
|
+
}, build = async (...args)=>{
|
|
6818
|
+
!getNodeEnv() && setNodeEnv('production');
|
|
6819
|
+
let buildInstance = await providerInstance.build(...args);
|
|
6820
|
+
return {
|
|
6821
|
+
...buildInstance,
|
|
6822
|
+
close: async ()=>{
|
|
6823
|
+
await context.hooks.onCloseBuild.call(), await buildInstance.close();
|
|
6824
|
+
}
|
|
6825
|
+
};
|
|
6816
6826
|
}, rsbuild = {
|
|
6817
|
-
build
|
|
6827
|
+
build,
|
|
6818
6828
|
preview,
|
|
6819
6829
|
startDevServer: (...args)=>(!getNodeEnv() && setNodeEnv('development'), providerInstance.startDevServer(...args)),
|
|
6820
6830
|
createDevServer: (...args)=>(!getNodeEnv() && setNodeEnv('development'), providerInstance.createDevServer(...args)),
|
|
@@ -6826,6 +6836,7 @@ async function createRsbuild(options = {}) {
|
|
|
6826
6836
|
]),
|
|
6827
6837
|
...pick(globalPluginAPI, [
|
|
6828
6838
|
'context',
|
|
6839
|
+
'onCloseBuild',
|
|
6829
6840
|
'onBeforeBuild',
|
|
6830
6841
|
'onBeforeCreateCompiler',
|
|
6831
6842
|
'onBeforeStartDevServer',
|
|
@@ -6882,11 +6893,11 @@ async function runCLI() {
|
|
|
6882
6893
|
}
|
|
6883
6894
|
}();
|
|
6884
6895
|
let { npm_execpath } = process.env;
|
|
6885
|
-
(!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js__.logger.greet(` Rsbuild v1.1.
|
|
6896
|
+
(!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js__.logger.greet(` Rsbuild v1.1.6\n`);
|
|
6886
6897
|
}();
|
|
6887
6898
|
try {
|
|
6888
6899
|
!function() {
|
|
6889
|
-
program.name('rsbuild').usage('<command> [options]').version("1.1.
|
|
6900
|
+
program.name('rsbuild').usage('<command> [options]').version("1.1.6");
|
|
6890
6901
|
let devCommand = program.command('dev'), buildCommand = program.command('build'), previewCommand = program.command('preview'), inspectCommand = program.command('inspect');
|
|
6891
6902
|
[
|
|
6892
6903
|
devCommand,
|
|
@@ -6945,6 +6956,6 @@ async function runCLI() {
|
|
|
6945
6956
|
__WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js__.logger.error('Failed to start Rsbuild CLI.'), __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js__.logger.error(err);
|
|
6946
6957
|
}
|
|
6947
6958
|
}
|
|
6948
|
-
let src_version = "1.1.
|
|
6959
|
+
let src_version = "1.1.6";
|
|
6949
6960
|
var __webpack_exports__logger = __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js__.logger, __webpack_exports__rspack = __WEBPACK_EXTERNAL_MODULE__rspack_core__.rspack;
|
|
6950
6961
|
export { PLUGIN_CSS_NAME, PLUGIN_SWC_NAME, internal_namespaceObject as __internalHelper, createRsbuild, defineConfig, ensureAssetPrefix, config_loadConfig as loadConfig, loadEnv, mergeRsbuildConfig, runCLI, src_version as version, __webpack_exports__logger as logger, __webpack_exports__rspack as rspack };
|
package/dist-types/hooks.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { AsyncHook, EnvironmentAsyncHook, InternalContext, ModifyBundlerChainFn, ModifyEnvironmentConfigFn, ModifyHTMLTagsFn, ModifyRsbuildConfigFn, ModifyRspackConfigFn, ModifyWebpackChainFn, ModifyWebpackConfigFn, OnAfterBuildFn, OnAfterCreateCompilerFn, OnAfterEnvironmentCompileFn, OnAfterStartDevServerFn, OnAfterStartProdServerFn, OnBeforeBuildFn, OnBeforeCreateCompilerFn, OnBeforeEnvironmentCompile, OnBeforeStartDevServerFn, OnBeforeStartProdServerFn, OnCloseDevServerFn, OnDevCompileDoneFn, OnExitFn, Rspack } from './types';
|
|
1
|
+
import type { AsyncHook, EnvironmentAsyncHook, InternalContext, ModifyBundlerChainFn, ModifyEnvironmentConfigFn, ModifyHTMLTagsFn, ModifyRsbuildConfigFn, ModifyRspackConfigFn, ModifyWebpackChainFn, ModifyWebpackConfigFn, OnAfterBuildFn, OnAfterCreateCompilerFn, OnAfterEnvironmentCompileFn, OnAfterStartDevServerFn, OnAfterStartProdServerFn, OnBeforeBuildFn, OnBeforeCreateCompilerFn, OnBeforeEnvironmentCompile, OnBeforeStartDevServerFn, OnBeforeStartProdServerFn, OnCloseBuildFn, OnCloseDevServerFn, OnDevCompileDoneFn, OnExitFn, Rspack } from './types';
|
|
2
2
|
export declare function createEnvironmentAsyncHook<Callback extends (...args: any[]) => any>(): EnvironmentAsyncHook<Callback>;
|
|
3
3
|
export declare function createAsyncHook<Callback extends (...args: any[]) => any>(): AsyncHook<Callback>;
|
|
4
4
|
export declare function initHooks(): {
|
|
5
5
|
/** The following hooks are global hooks */
|
|
6
6
|
onExit: AsyncHook<OnExitFn>;
|
|
7
7
|
onAfterBuild: AsyncHook<OnAfterBuildFn>;
|
|
8
|
+
onCloseBuild: AsyncHook<OnCloseBuildFn>;
|
|
8
9
|
onBeforeBuild: AsyncHook<OnBeforeBuildFn>;
|
|
9
10
|
onDevCompileDone: AsyncHook<OnDevCompileDoneFn>;
|
|
10
11
|
onCloseDevServer: AsyncHook<OnCloseDevServerFn>;
|
|
@@ -13,6 +13,7 @@ export type OnBeforeEnvironmentCompile<B = 'rspack'> = (params: CompileCommonPar
|
|
|
13
13
|
environment: EnvironmentContext;
|
|
14
14
|
bundlerConfig?: B extends 'rspack' ? Rspack.Configuration : WebpackConfig;
|
|
15
15
|
}) => MaybePromise<void>;
|
|
16
|
+
export type OnCloseBuildFn = () => MaybePromise<void>;
|
|
16
17
|
export type OnBeforeBuildFn<B = 'rspack'> = (params: CompileCommonParams & {
|
|
17
18
|
environments: Record<string, EnvironmentContext>;
|
|
18
19
|
bundlerConfigs?: B extends 'rspack' ? Rspack.Configuration[] : WebpackConfig[];
|
|
@@ -3,7 +3,7 @@ import type RspackChain from '../../compiled/rspack-chain/index.js';
|
|
|
3
3
|
import type { ChainIdentifier } from '../configChain';
|
|
4
4
|
import type { ModifyRspackConfigUtils, NormalizedConfig, NormalizedEnvironmentConfig, RsbuildConfig } from './config';
|
|
5
5
|
import type { RsbuildContext } from './context';
|
|
6
|
-
import type { EnvironmentContext, ModifyBundlerChainFn, ModifyChainUtils, ModifyEnvironmentConfigFn, ModifyHTMLTagsFn, ModifyRsbuildConfigFn, OnAfterBuildFn, OnAfterCreateCompilerFn, OnAfterEnvironmentCompileFn, OnAfterStartDevServerFn, OnAfterStartProdServerFn, OnBeforeBuildFn, OnBeforeCreateCompilerFn, OnBeforeEnvironmentCompile, OnBeforeStartDevServerFn, OnBeforeStartProdServerFn, OnCloseDevServerFn, OnDevCompileDoneFn, OnExitFn } from './hooks';
|
|
6
|
+
import type { EnvironmentContext, ModifyBundlerChainFn, ModifyChainUtils, ModifyEnvironmentConfigFn, ModifyHTMLTagsFn, ModifyRsbuildConfigFn, OnAfterBuildFn, OnAfterCreateCompilerFn, OnAfterEnvironmentCompileFn, OnAfterStartDevServerFn, OnAfterStartProdServerFn, OnBeforeBuildFn, OnBeforeCreateCompilerFn, OnBeforeEnvironmentCompile, OnBeforeStartDevServerFn, OnBeforeStartProdServerFn, OnCloseBuildFn, OnCloseDevServerFn, OnDevCompileDoneFn, OnExitFn } from './hooks';
|
|
7
7
|
import type { RsbuildTarget } from './rsbuild';
|
|
8
8
|
import type { Rspack } from './rspack';
|
|
9
9
|
import type { HtmlRspackPlugin } from './thirdParty';
|
|
@@ -279,6 +279,7 @@ export type RsbuildPluginAPI = Readonly<{
|
|
|
279
279
|
context: Readonly<RsbuildContext>;
|
|
280
280
|
isPluginExists: PluginManager['isPluginExists'];
|
|
281
281
|
onExit: PluginHook<OnExitFn>;
|
|
282
|
+
onCloseBuild: PluginHook<OnCloseBuildFn>;
|
|
282
283
|
onAfterBuild: PluginHook<OnAfterBuildFn>;
|
|
283
284
|
onBeforeBuild: PluginHook<OnBeforeBuildFn>;
|
|
284
285
|
onAfterEnvironmentCompile: PluginHook<OnAfterEnvironmentCompileFn>;
|
|
@@ -134,6 +134,7 @@ export type RsbuildInstance = {
|
|
|
134
134
|
onCloseDevServer: RsbuildPluginAPI['onCloseDevServer'];
|
|
135
135
|
onDevCompileDone: RsbuildPluginAPI['onDevCompileDone'];
|
|
136
136
|
onExit: RsbuildPluginAPI['onExit'];
|
|
137
|
+
onCloseBuild: RsbuildPluginAPI['onCloseBuild'];
|
|
137
138
|
};
|
|
138
139
|
export type RsbuildTarget = 'web' | 'node' | 'web-worker';
|
|
139
140
|
export type RsbuildEntryDescription = Rspack.EntryDescription & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "The Rspack-based build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"bugs": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"types.d.ts"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@rspack/core": "~1.1.
|
|
49
|
+
"@rspack/core": "~1.1.4",
|
|
50
50
|
"@rspack/lite-tapable": "~1.0.1",
|
|
51
51
|
"@swc/helpers": "^0.5.15",
|
|
52
52
|
"core-js": "~3.39.0"
|