@rsbuild/core 1.0.14 → 1.0.16
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 +20 -20
- package/compiled/html-rspack-plugin/index.d.ts +5 -0
- package/compiled/html-rspack-plugin/index.js +16 -15
- package/compiled/html-rspack-plugin/package.json +1 -1
- package/compiled/postcss-loader/index.js +8 -8
- package/compiled/rspack-manifest-plugin/index.js +4 -4
- package/dist/index.cjs +46 -19
- package/dist/index.js +46 -19
- package/dist-types/helpers/index.d.ts +2 -1
- package/dist-types/loadEnv.d.ts +26 -3
- package/dist-types/types/config.d.ts +2 -1
- package/dist-types/types/plugin.d.ts +1 -0
- package/package.json +3 -3
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
2358: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const loader = __nccwpck_require__(
|
|
5
|
+
const loader = __nccwpck_require__(536);
|
|
6
6
|
module.exports = loader.default;
|
|
7
7
|
module.exports.defaultGetLocalIdent =
|
|
8
|
-
__nccwpck_require__(
|
|
8
|
+
__nccwpck_require__(9166).defaultGetLocalIdent;
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
536: (__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__(3360));
|
|
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__(2438));
|
|
18
|
+
var _plugins = __nccwpck_require__(9490);
|
|
19
|
+
var _utils = __nccwpck_require__(9166);
|
|
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
|
+
9490: (__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__(2782),
|
|
269
269
|
);
|
|
270
270
|
var _postcssIcssParser = _interopRequireDefault(
|
|
271
|
-
__nccwpck_require__(
|
|
271
|
+
__nccwpck_require__(1885),
|
|
272
272
|
);
|
|
273
|
-
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(
|
|
273
|
+
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(4908));
|
|
274
274
|
function _interopRequireDefault(obj) {
|
|
275
275
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
|
-
|
|
278
|
+
1885: (__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__(8406);
|
|
283
|
-
var _utils = __nccwpck_require__(
|
|
283
|
+
var _utils = __nccwpck_require__(9166);
|
|
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
|
+
2782: (__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__(9166);
|
|
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
|
+
4908: (__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__(9166);
|
|
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
|
+
9166: (__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;
|
|
@@ -7960,7 +7960,7 @@
|
|
|
7960
7960
|
"use strict";
|
|
7961
7961
|
module.exports = require("util");
|
|
7962
7962
|
},
|
|
7963
|
-
|
|
7963
|
+
2438: (module) => {
|
|
7964
7964
|
"use strict";
|
|
7965
7965
|
module.exports = JSON.parse(
|
|
7966
7966
|
'{"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"}',
|
|
@@ -7995,6 +7995,6 @@
|
|
|
7995
7995
|
}
|
|
7996
7996
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
7997
7997
|
__nccwpck_require__.ab = __dirname + "/";
|
|
7998
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
7998
|
+
var __webpack_exports__ = __nccwpck_require__(2358);
|
|
7999
7999
|
module.exports = __webpack_exports__;
|
|
8000
8000
|
})();
|
|
@@ -16,8 +16,13 @@ declare class HtmlRspackPlugin {
|
|
|
16
16
|
|
|
17
17
|
apply(compiler: Compiler): void;
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated use `getCompilationHooks` instead
|
|
21
|
+
*/
|
|
19
22
|
static getHooks(compilation: Compilation): HtmlRspackPlugin.Hooks;
|
|
20
23
|
|
|
24
|
+
static getCompilationHooks(compilation: Compilation): HtmlRspackPlugin.Hooks;
|
|
25
|
+
|
|
21
26
|
/**
|
|
22
27
|
* Static helper to create a tag object to be get injected into the dom
|
|
23
28
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
825: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const { HtmlWebpackChildCompiler } = __nccwpck_require__(
|
|
5
|
+
const { HtmlWebpackChildCompiler } = __nccwpck_require__(201);
|
|
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
|
+
201: (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
|
+
928: (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
|
+
627: (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
|
+
766: (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
|
+
217: (module) => {
|
|
543
543
|
const voidTags = [
|
|
544
544
|
"area",
|
|
545
545
|
"base",
|
|
@@ -607,19 +607,19 @@
|
|
|
607
607
|
htmlTagObjectToString,
|
|
608
608
|
};
|
|
609
609
|
},
|
|
610
|
-
|
|
610
|
+
175: (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__(825);
|
|
617
617
|
const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } =
|
|
618
|
-
__nccwpck_require__(
|
|
619
|
-
const prettyError = __nccwpck_require__(
|
|
620
|
-
const chunkSorter = __nccwpck_require__(
|
|
618
|
+
__nccwpck_require__(217);
|
|
619
|
+
const prettyError = __nccwpck_require__(627);
|
|
620
|
+
const chunkSorter = __nccwpck_require__(928);
|
|
621
621
|
const getHtmlRspackPluginHooks =
|
|
622
|
-
__nccwpck_require__(
|
|
622
|
+
__nccwpck_require__(766).getHtmlRspackPluginHooks;
|
|
623
623
|
class HtmlRspackPlugin {
|
|
624
624
|
constructor(userOptions = {}) {
|
|
625
625
|
this.version = HtmlRspackPlugin.version;
|
|
@@ -1265,7 +1265,7 @@
|
|
|
1265
1265
|
fileContent,
|
|
1266
1266
|
compilation,
|
|
1267
1267
|
) {
|
|
1268
|
-
if (/\[
|
|
1268
|
+
if (/\[(?:[\w:]+)\]/.test(filename) === false) {
|
|
1269
1269
|
return { path: filename, info: {} };
|
|
1270
1270
|
}
|
|
1271
1271
|
const hash = compiler.webpack.util.createHash(
|
|
@@ -1530,6 +1530,7 @@
|
|
|
1530
1530
|
};
|
|
1531
1531
|
}
|
|
1532
1532
|
HtmlRspackPlugin.version = 6;
|
|
1533
|
+
HtmlRspackPlugin.getCompilationHooks = getHtmlRspackPluginHooks;
|
|
1533
1534
|
HtmlRspackPlugin.getHooks = getHtmlRspackPluginHooks;
|
|
1534
1535
|
HtmlRspackPlugin.createHtmlTagObject = createHtmlTagObject;
|
|
1535
1536
|
module.exports = HtmlRspackPlugin;
|
|
@@ -1577,6 +1578,6 @@
|
|
|
1577
1578
|
}
|
|
1578
1579
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
1579
1580
|
__nccwpck_require__.ab = __dirname + "/";
|
|
1580
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
1581
|
+
var __webpack_exports__ = __nccwpck_require__(175);
|
|
1581
1582
|
module.exports = __webpack_exports__;
|
|
1582
1583
|
})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"html-rspack-plugin","author":"Jan Nicklas <j.nicklas@me.com> (https://github.com/jantimon)","version":"6.0.
|
|
1
|
+
{"name":"html-rspack-plugin","author":"Jan Nicklas <j.nicklas@me.com> (https://github.com/jantimon)","version":"6.0.2","funding":{"type":"opencollective","url":"https://opencollective.com/html-webpack-plugin"},"license":"MIT","types":"index.d.ts","type":"commonjs"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
5
|
-
module.exports = __nccwpck_require__(
|
|
4
|
+
533: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
module.exports = __nccwpck_require__(646)["default"];
|
|
6
6
|
},
|
|
7
|
-
|
|
7
|
+
646: (__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__(360));
|
|
13
|
-
var _options = _interopRequireDefault(__nccwpck_require__(
|
|
14
|
-
var _utils = __nccwpck_require__(
|
|
13
|
+
var _options = _interopRequireDefault(__nccwpck_require__(839));
|
|
14
|
+
var _utils = __nccwpck_require__(107);
|
|
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
|
+
107: (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
|
+
839: (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__(533);
|
|
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
|
+
376: (__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
|
+
317: (__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__(376);
|
|
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__(317);
|
|
316
316
|
Object.defineProperty(exports, "getCompilerHooks", {
|
|
317
317
|
enumerable: true,
|
|
318
318
|
get: function () {
|
package/dist/index.cjs
CHANGED
|
@@ -4894,11 +4894,13 @@ function loadEnv({
|
|
|
4894
4894
|
}
|
|
4895
4895
|
(0, import_dotenv_expand.expand)({ parsed });
|
|
4896
4896
|
const publicVars = {};
|
|
4897
|
+
const rawPublicVars = {};
|
|
4897
4898
|
for (const key of Object.keys(process.env)) {
|
|
4898
4899
|
if (prefixes.some((prefix) => key.startsWith(prefix))) {
|
|
4899
4900
|
const val = process.env[key];
|
|
4900
4901
|
publicVars[`import.meta.env.${key}`] = JSON.stringify(val);
|
|
4901
4902
|
publicVars[`process.env.${key}`] = JSON.stringify(val);
|
|
4903
|
+
rawPublicVars[key] = val;
|
|
4902
4904
|
}
|
|
4903
4905
|
}
|
|
4904
4906
|
let cleaned = false;
|
|
@@ -4920,7 +4922,8 @@ function loadEnv({
|
|
|
4920
4922
|
parsed,
|
|
4921
4923
|
cleanup,
|
|
4922
4924
|
filePaths,
|
|
4923
|
-
publicVars
|
|
4925
|
+
publicVars,
|
|
4926
|
+
rawPublicVars
|
|
4924
4927
|
};
|
|
4925
4928
|
}
|
|
4926
4929
|
var import_node_fs3, import_node_path7, import_dotenv, import_dotenv_expand;
|
|
@@ -6015,7 +6018,7 @@ async function createContext(options, userConfig, bundlerType) {
|
|
|
6015
6018
|
const rsbuildConfig = await withDefaultConfig(rootPath, userConfig);
|
|
6016
6019
|
const cachePath = (0, import_node_path10.join)(rootPath, "node_modules", ".cache");
|
|
6017
6020
|
return {
|
|
6018
|
-
version: "1.0.
|
|
6021
|
+
version: "1.0.16",
|
|
6019
6022
|
rootPath,
|
|
6020
6023
|
distPath: "",
|
|
6021
6024
|
cachePath,
|
|
@@ -6501,6 +6504,16 @@ async function getConfigUtils(config, chainUtils) {
|
|
|
6501
6504
|
}
|
|
6502
6505
|
config.module.rules.unshift(...ruleArr);
|
|
6503
6506
|
},
|
|
6507
|
+
appendRules(rules) {
|
|
6508
|
+
const ruleArr = castArray(rules);
|
|
6509
|
+
if (!config.module) {
|
|
6510
|
+
config.module = {};
|
|
6511
|
+
}
|
|
6512
|
+
if (!config.module.rules) {
|
|
6513
|
+
config.module.rules = [];
|
|
6514
|
+
}
|
|
6515
|
+
config.module.rules.push(...ruleArr);
|
|
6516
|
+
},
|
|
6504
6517
|
prependPlugins(plugins) {
|
|
6505
6518
|
const pluginArr = castArray(plugins);
|
|
6506
6519
|
if (!config.plugins) {
|
|
@@ -7415,11 +7428,12 @@ var init_environment = __esm({
|
|
|
7415
7428
|
|
|
7416
7429
|
// src/server/helper.ts
|
|
7417
7430
|
function getURLMessages(urls, routes) {
|
|
7418
|
-
if (routes.length
|
|
7431
|
+
if (routes.length <= 1) {
|
|
7432
|
+
const pathname = routes.length ? routes[0].pathname : "";
|
|
7419
7433
|
return urls.map(({ label, url: url2 }) => {
|
|
7420
|
-
const
|
|
7434
|
+
const normalizedPathname = normalizeUrl(`${url2}${pathname}`);
|
|
7421
7435
|
const prefix = `➜ ${import_picocolors11.default.dim(label.padEnd(10))}`;
|
|
7422
|
-
return ` ${prefix}${import_picocolors11.default.cyan(
|
|
7436
|
+
return ` ${prefix}${import_picocolors11.default.cyan(normalizedPathname)}
|
|
7423
7437
|
`;
|
|
7424
7438
|
}).join("");
|
|
7425
7439
|
}
|
|
@@ -7452,7 +7466,8 @@ function printServerURLs({
|
|
|
7452
7466
|
return null;
|
|
7453
7467
|
}
|
|
7454
7468
|
let urls = originalUrls;
|
|
7455
|
-
|
|
7469
|
+
const useCustomUrl = isFunction(printUrls);
|
|
7470
|
+
if (useCustomUrl) {
|
|
7456
7471
|
const newUrls = printUrls({
|
|
7457
7472
|
urls: urls.map((item) => item.url),
|
|
7458
7473
|
port,
|
|
@@ -7472,7 +7487,10 @@ function printServerURLs({
|
|
|
7472
7487
|
label: getUrlLabel(url2)
|
|
7473
7488
|
}));
|
|
7474
7489
|
}
|
|
7475
|
-
if (urls.length === 0
|
|
7490
|
+
if (urls.length === 0) {
|
|
7491
|
+
return null;
|
|
7492
|
+
}
|
|
7493
|
+
if (routes.length === 0 && !useCustomUrl) {
|
|
7476
7494
|
return null;
|
|
7477
7495
|
}
|
|
7478
7496
|
let message = getURLMessages(urls, routes);
|
|
@@ -9845,11 +9863,18 @@ var init_output = __esm({
|
|
|
9845
9863
|
const extractPluginOptions = config.tools.cssExtract.pluginOptions;
|
|
9846
9864
|
const cssPath = config.output.distPath.css;
|
|
9847
9865
|
const cssFilename = getFilename(config, "css", isProd);
|
|
9866
|
+
const isCssFilenameFn = typeof cssFilename === "function";
|
|
9848
9867
|
const cssAsyncPath = config.output.distPath.cssAsync ?? (cssPath ? `${cssPath}/async` : "async");
|
|
9849
9868
|
chain.plugin(CHAIN_ID2.PLUGIN.MINI_CSS_EXTRACT).use(getCssExtractPlugin(), [
|
|
9850
9869
|
{
|
|
9851
|
-
filename:
|
|
9852
|
-
|
|
9870
|
+
filename: isCssFilenameFn ? (...args) => {
|
|
9871
|
+
const name = cssFilename(...args);
|
|
9872
|
+
return import_node_path22.posix.join(cssPath, name);
|
|
9873
|
+
} : import_node_path22.posix.join(cssPath, cssFilename),
|
|
9874
|
+
chunkFilename: isCssFilenameFn ? (...args) => {
|
|
9875
|
+
const name = cssFilename(...args);
|
|
9876
|
+
return import_node_path22.posix.join(cssAsyncPath, name);
|
|
9877
|
+
} : import_node_path22.posix.join(cssAsyncPath, cssFilename),
|
|
9853
9878
|
...extractPluginOptions
|
|
9854
9879
|
}
|
|
9855
9880
|
]);
|
|
@@ -12591,10 +12616,16 @@ function pluginModuleFederation() {
|
|
|
12591
12616
|
if (!moduleFederation?.options) {
|
|
12592
12617
|
return;
|
|
12593
12618
|
}
|
|
12594
|
-
if (moduleFederation.options.exposes
|
|
12619
|
+
if (moduleFederation.options.exposes) {
|
|
12595
12620
|
config.dev ||= {};
|
|
12596
|
-
config.dev.client
|
|
12597
|
-
|
|
12621
|
+
if (config.server?.port && !config.dev.client?.port) {
|
|
12622
|
+
config.dev.client ||= {};
|
|
12623
|
+
config.dev.client.port = config.server.port;
|
|
12624
|
+
}
|
|
12625
|
+
const originalConfig = api.getRsbuildConfig("original");
|
|
12626
|
+
if (originalConfig.dev?.assetPrefix === void 0 && config.dev.assetPrefix === DEFAULT_ASSET_PREFIX) {
|
|
12627
|
+
config.dev.assetPrefix = true;
|
|
12628
|
+
}
|
|
12598
12629
|
}
|
|
12599
12630
|
});
|
|
12600
12631
|
api.modifyEnvironmentConfig((config) => {
|
|
@@ -12629,10 +12660,6 @@ function pluginModuleFederation() {
|
|
|
12629
12660
|
chain.output.set("uniqueName", options.name);
|
|
12630
12661
|
}
|
|
12631
12662
|
}
|
|
12632
|
-
const publicPath = chain.output.get("publicPath");
|
|
12633
|
-
if (publicPath === DEFAULT_ASSET_PREFIX) {
|
|
12634
|
-
chain.output.set("publicPath", "auto");
|
|
12635
|
-
}
|
|
12636
12663
|
}
|
|
12637
12664
|
);
|
|
12638
12665
|
}
|
|
@@ -13556,7 +13583,7 @@ var init_init = __esm({
|
|
|
13556
13583
|
|
|
13557
13584
|
// src/cli/commands.ts
|
|
13558
13585
|
function runCli() {
|
|
13559
|
-
program.name("rsbuild").usage("<command> [options]").version("1.0.
|
|
13586
|
+
program.name("rsbuild").usage("<command> [options]").version("1.0.16");
|
|
13560
13587
|
const devCommand = program.command("dev");
|
|
13561
13588
|
const buildCommand = program.command("build");
|
|
13562
13589
|
const previewCommand = program.command("preview");
|
|
@@ -13665,7 +13692,7 @@ function prepareCli() {
|
|
|
13665
13692
|
if (!npm_execpath || npm_execpath.includes("npx-cli.js") || npm_execpath.includes(".bun")) {
|
|
13666
13693
|
console.log();
|
|
13667
13694
|
}
|
|
13668
|
-
import_rslog.logger.greet(` ${`Rsbuild v${"1.0.
|
|
13695
|
+
import_rslog.logger.greet(` ${`Rsbuild v${"1.0.16"}`}
|
|
13669
13696
|
`);
|
|
13670
13697
|
}
|
|
13671
13698
|
var import_node_module;
|
|
@@ -13751,7 +13778,7 @@ init_logger();
|
|
|
13751
13778
|
init_mergeConfig();
|
|
13752
13779
|
init_helpers();
|
|
13753
13780
|
init_constants();
|
|
13754
|
-
var version = "1.0.
|
|
13781
|
+
var version = "1.0.16";
|
|
13755
13782
|
// Annotate the CommonJS export names for ESM import in node:
|
|
13756
13783
|
0 && (module.exports = {
|
|
13757
13784
|
PLUGIN_CSS_NAME,
|
package/dist/index.js
CHANGED
|
@@ -4939,11 +4939,13 @@ function loadEnv({
|
|
|
4939
4939
|
}
|
|
4940
4940
|
(0, import_dotenv_expand.expand)({ parsed });
|
|
4941
4941
|
const publicVars = {};
|
|
4942
|
+
const rawPublicVars = {};
|
|
4942
4943
|
for (const key of Object.keys(process.env)) {
|
|
4943
4944
|
if (prefixes.some((prefix) => key.startsWith(prefix))) {
|
|
4944
4945
|
const val = process.env[key];
|
|
4945
4946
|
publicVars[`import.meta.env.${key}`] = JSON.stringify(val);
|
|
4946
4947
|
publicVars[`process.env.${key}`] = JSON.stringify(val);
|
|
4948
|
+
rawPublicVars[key] = val;
|
|
4947
4949
|
}
|
|
4948
4950
|
}
|
|
4949
4951
|
let cleaned = false;
|
|
@@ -4965,7 +4967,8 @@ function loadEnv({
|
|
|
4965
4967
|
parsed,
|
|
4966
4968
|
cleanup,
|
|
4967
4969
|
filePaths,
|
|
4968
|
-
publicVars
|
|
4970
|
+
publicVars,
|
|
4971
|
+
rawPublicVars
|
|
4969
4972
|
};
|
|
4970
4973
|
}
|
|
4971
4974
|
var import_dotenv, import_dotenv_expand;
|
|
@@ -6064,7 +6067,7 @@ async function createContext(options, userConfig, bundlerType) {
|
|
|
6064
6067
|
const rsbuildConfig = await withDefaultConfig(rootPath, userConfig);
|
|
6065
6068
|
const cachePath = join6(rootPath, "node_modules", ".cache");
|
|
6066
6069
|
return {
|
|
6067
|
-
version: "1.0.
|
|
6070
|
+
version: "1.0.16",
|
|
6068
6071
|
rootPath,
|
|
6069
6072
|
distPath: "",
|
|
6070
6073
|
cachePath,
|
|
@@ -6556,6 +6559,16 @@ async function getConfigUtils(config, chainUtils) {
|
|
|
6556
6559
|
}
|
|
6557
6560
|
config.module.rules.unshift(...ruleArr);
|
|
6558
6561
|
},
|
|
6562
|
+
appendRules(rules) {
|
|
6563
|
+
const ruleArr = castArray(rules);
|
|
6564
|
+
if (!config.module) {
|
|
6565
|
+
config.module = {};
|
|
6566
|
+
}
|
|
6567
|
+
if (!config.module.rules) {
|
|
6568
|
+
config.module.rules = [];
|
|
6569
|
+
}
|
|
6570
|
+
config.module.rules.push(...ruleArr);
|
|
6571
|
+
},
|
|
6559
6572
|
prependPlugins(plugins) {
|
|
6560
6573
|
const pluginArr = castArray(plugins);
|
|
6561
6574
|
if (!config.plugins) {
|
|
@@ -7481,11 +7494,12 @@ import os from "os";
|
|
|
7481
7494
|
import { posix as posix3 } from "path";
|
|
7482
7495
|
import color11 from "../compiled/picocolors/index.js";
|
|
7483
7496
|
function getURLMessages(urls, routes) {
|
|
7484
|
-
if (routes.length
|
|
7497
|
+
if (routes.length <= 1) {
|
|
7498
|
+
const pathname = routes.length ? routes[0].pathname : "";
|
|
7485
7499
|
return urls.map(({ label, url: url2 }) => {
|
|
7486
|
-
const
|
|
7500
|
+
const normalizedPathname = normalizeUrl(`${url2}${pathname}`);
|
|
7487
7501
|
const prefix = `➜ ${color11.dim(label.padEnd(10))}`;
|
|
7488
|
-
return ` ${prefix}${color11.cyan(
|
|
7502
|
+
return ` ${prefix}${color11.cyan(normalizedPathname)}
|
|
7489
7503
|
`;
|
|
7490
7504
|
}).join("");
|
|
7491
7505
|
}
|
|
@@ -7518,7 +7532,8 @@ function printServerURLs({
|
|
|
7518
7532
|
return null;
|
|
7519
7533
|
}
|
|
7520
7534
|
let urls = originalUrls;
|
|
7521
|
-
|
|
7535
|
+
const useCustomUrl = isFunction(printUrls);
|
|
7536
|
+
if (useCustomUrl) {
|
|
7522
7537
|
const newUrls = printUrls({
|
|
7523
7538
|
urls: urls.map((item) => item.url),
|
|
7524
7539
|
port,
|
|
@@ -7538,7 +7553,10 @@ function printServerURLs({
|
|
|
7538
7553
|
label: getUrlLabel(url2)
|
|
7539
7554
|
}));
|
|
7540
7555
|
}
|
|
7541
|
-
if (urls.length === 0
|
|
7556
|
+
if (urls.length === 0) {
|
|
7557
|
+
return null;
|
|
7558
|
+
}
|
|
7559
|
+
if (routes.length === 0 && !useCustomUrl) {
|
|
7542
7560
|
return null;
|
|
7543
7561
|
}
|
|
7544
7562
|
let message = getURLMessages(urls, routes);
|
|
@@ -9927,11 +9945,18 @@ var init_output = __esm({
|
|
|
9927
9945
|
const extractPluginOptions = config.tools.cssExtract.pluginOptions;
|
|
9928
9946
|
const cssPath = config.output.distPath.css;
|
|
9929
9947
|
const cssFilename = getFilename2(config, "css", isProd);
|
|
9948
|
+
const isCssFilenameFn = typeof cssFilename === "function";
|
|
9930
9949
|
const cssAsyncPath = config.output.distPath.cssAsync ?? (cssPath ? `${cssPath}/async` : "async");
|
|
9931
9950
|
chain.plugin(CHAIN_ID2.PLUGIN.MINI_CSS_EXTRACT).use(getCssExtractPlugin(), [
|
|
9932
9951
|
{
|
|
9933
|
-
filename:
|
|
9934
|
-
|
|
9952
|
+
filename: isCssFilenameFn ? (...args) => {
|
|
9953
|
+
const name = cssFilename(...args);
|
|
9954
|
+
return posix4.join(cssPath, name);
|
|
9955
|
+
} : posix4.join(cssPath, cssFilename),
|
|
9956
|
+
chunkFilename: isCssFilenameFn ? (...args) => {
|
|
9957
|
+
const name = cssFilename(...args);
|
|
9958
|
+
return posix4.join(cssAsyncPath, name);
|
|
9959
|
+
} : posix4.join(cssAsyncPath, cssFilename),
|
|
9935
9960
|
...extractPluginOptions
|
|
9936
9961
|
}
|
|
9937
9962
|
]);
|
|
@@ -12703,10 +12728,16 @@ function pluginModuleFederation() {
|
|
|
12703
12728
|
if (!moduleFederation?.options) {
|
|
12704
12729
|
return;
|
|
12705
12730
|
}
|
|
12706
|
-
if (moduleFederation.options.exposes
|
|
12731
|
+
if (moduleFederation.options.exposes) {
|
|
12707
12732
|
config.dev ||= {};
|
|
12708
|
-
config.dev.client
|
|
12709
|
-
|
|
12733
|
+
if (config.server?.port && !config.dev.client?.port) {
|
|
12734
|
+
config.dev.client ||= {};
|
|
12735
|
+
config.dev.client.port = config.server.port;
|
|
12736
|
+
}
|
|
12737
|
+
const originalConfig = api.getRsbuildConfig("original");
|
|
12738
|
+
if (originalConfig.dev?.assetPrefix === void 0 && config.dev.assetPrefix === DEFAULT_ASSET_PREFIX) {
|
|
12739
|
+
config.dev.assetPrefix = true;
|
|
12740
|
+
}
|
|
12710
12741
|
}
|
|
12711
12742
|
});
|
|
12712
12743
|
api.modifyEnvironmentConfig((config) => {
|
|
@@ -12741,10 +12772,6 @@ function pluginModuleFederation() {
|
|
|
12741
12772
|
chain.output.set("uniqueName", options.name);
|
|
12742
12773
|
}
|
|
12743
12774
|
}
|
|
12744
|
-
const publicPath = chain.output.get("publicPath");
|
|
12745
|
-
if (publicPath === DEFAULT_ASSET_PREFIX) {
|
|
12746
|
-
chain.output.set("publicPath", "auto");
|
|
12747
|
-
}
|
|
12748
12775
|
}
|
|
12749
12776
|
);
|
|
12750
12777
|
}
|
|
@@ -13674,7 +13701,7 @@ var init_init = __esm({
|
|
|
13674
13701
|
|
|
13675
13702
|
// src/cli/commands.ts
|
|
13676
13703
|
function runCli() {
|
|
13677
|
-
program.name("rsbuild").usage("<command> [options]").version("1.0.
|
|
13704
|
+
program.name("rsbuild").usage("<command> [options]").version("1.0.16");
|
|
13678
13705
|
const devCommand = program.command("dev");
|
|
13679
13706
|
const buildCommand = program.command("build");
|
|
13680
13707
|
const previewCommand = program.command("preview");
|
|
@@ -13785,7 +13812,7 @@ function prepareCli() {
|
|
|
13785
13812
|
if (!npm_execpath || npm_execpath.includes("npx-cli.js") || npm_execpath.includes(".bun")) {
|
|
13786
13813
|
console.log();
|
|
13787
13814
|
}
|
|
13788
|
-
logger.greet(` ${`Rsbuild v${"1.0.
|
|
13815
|
+
logger.greet(` ${`Rsbuild v${"1.0.16"}`}
|
|
13789
13816
|
`);
|
|
13790
13817
|
}
|
|
13791
13818
|
var init_prepare = __esm({
|
|
@@ -13856,7 +13883,7 @@ init_mergeConfig();
|
|
|
13856
13883
|
init_helpers();
|
|
13857
13884
|
init_constants();
|
|
13858
13885
|
import { rspack as rspack10 } from "@rspack/core";
|
|
13859
|
-
var version = "1.0.
|
|
13886
|
+
var version = "1.0.16";
|
|
13860
13887
|
export {
|
|
13861
13888
|
PLUGIN_CSS_NAME,
|
|
13862
13889
|
PLUGIN_SWC_NAME,
|
|
@@ -23,7 +23,8 @@ export declare const getPublicPathFromCompiler: (compiler: Rspack.Compiler | Rsp
|
|
|
23
23
|
export declare const canParse: (url: string) => boolean;
|
|
24
24
|
export declare const ensureAssetPrefix: (url: string, assetPrefix?: Rspack.PublicPath) => string;
|
|
25
25
|
export declare function getFilename(config: NormalizedConfig | NormalizedEnvironmentConfig, type: 'js', isProd: boolean, isServer?: boolean): NonNullable<FilenameConfig['js']>;
|
|
26
|
-
export declare function getFilename(config: NormalizedConfig | NormalizedEnvironmentConfig, type:
|
|
26
|
+
export declare function getFilename(config: NormalizedConfig | NormalizedEnvironmentConfig, type: 'css', isProd: boolean): NonNullable<FilenameConfig['css']>;
|
|
27
|
+
export declare function getFilename(config: NormalizedConfig | NormalizedEnvironmentConfig, type: Exclude<keyof FilenameConfig, 'js' | 'css'>, isProd: boolean, isServer?: boolean): string;
|
|
27
28
|
export declare function partition<T>(array: T[], predicate: (value: T) => boolean): [T[], T[]];
|
|
28
29
|
export declare const applyToCompiler: (compiler: Rspack.Compiler | Rspack.MultiCompiler, apply: (c: Rspack.Compiler, index: number) => void) => void;
|
|
29
30
|
export declare const upperFirst: (str: string) => string;
|
package/dist-types/loadEnv.d.ts
CHANGED
|
@@ -16,12 +16,35 @@ export type LoadEnvOptions = {
|
|
|
16
16
|
prefixes?: string[];
|
|
17
17
|
};
|
|
18
18
|
export declare function loadEnv({ cwd, mode, prefixes, }?: LoadEnvOptions): {
|
|
19
|
-
/** All
|
|
19
|
+
/** All env variables in the .env file */
|
|
20
20
|
parsed: Record<string, string>;
|
|
21
21
|
/** The absolute paths to all env files */
|
|
22
22
|
filePaths: string[];
|
|
23
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Env variables that start with prefixes.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* {
|
|
29
|
+
* PUBLIC_FOO: 'bar',
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
**/
|
|
33
|
+
rawPublicVars: Record<string, string | undefined>;
|
|
34
|
+
/**
|
|
35
|
+
* Formatted env variables that start with prefixes.
|
|
36
|
+
* The keys contain the prefixes `process.env.*` and `import.meta.env.*`.
|
|
37
|
+
* The values are processed by `JSON.stringify`.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* {
|
|
42
|
+
* 'process.env.PUBLIC_FOO': '"bar"',
|
|
43
|
+
* 'import.meta.env.PUBLIC_FOO': '"bar"',
|
|
44
|
+
* }
|
|
45
|
+
* ```
|
|
46
|
+
**/
|
|
24
47
|
publicVars: Record<string, string>;
|
|
25
|
-
/** Clear the
|
|
48
|
+
/** Clear the env variables mounted on `process.env` */
|
|
26
49
|
cleanup: () => void;
|
|
27
50
|
};
|
|
@@ -25,6 +25,7 @@ export type ToolsHtmlPluginConfig = ConfigChainWithContext<HtmlRspackPlugin.Opti
|
|
|
25
25
|
}>;
|
|
26
26
|
export type ModifyRspackConfigUtils = ModifyChainUtils & {
|
|
27
27
|
addRules: (rules: RspackRule | RspackRule[]) => void;
|
|
28
|
+
appendRules: (rules: RspackRule | RspackRule[]) => void;
|
|
28
29
|
prependPlugins: (plugins: BundlerPluginInstance | BundlerPluginInstance[]) => void;
|
|
29
30
|
appendPlugins: (plugins: BundlerPluginInstance | BundlerPluginInstance[]) => void;
|
|
30
31
|
removePlugin: (pluginName: string) => void;
|
|
@@ -495,7 +496,7 @@ export type FilenameConfig = {
|
|
|
495
496
|
* - dev: '[name].css'
|
|
496
497
|
* - prod: '[name].[contenthash:8].css'
|
|
497
498
|
*/
|
|
498
|
-
css?:
|
|
499
|
+
css?: NonNullable<Rspack.Configuration['output']>['cssFilename'];
|
|
499
500
|
/**
|
|
500
501
|
* The name of the SVG images.
|
|
501
502
|
* @default '[name].[contenthash:8].svg'
|
|
@@ -51,6 +51,7 @@ export type ModifyWebpackChainUtils = ModifyChainUtils & {
|
|
|
51
51
|
};
|
|
52
52
|
export type ModifyWebpackConfigUtils = ModifyWebpackChainUtils & {
|
|
53
53
|
addRules: (rules: RuleSetRule | RuleSetRule[]) => void;
|
|
54
|
+
appendRules: (rules: RuleSetRule | RuleSetRule[]) => void;
|
|
54
55
|
prependPlugins: (plugins: WebpackPluginInstance | WebpackPluginInstance[]) => void;
|
|
55
56
|
appendPlugins: (plugins: WebpackPluginInstance | WebpackPluginInstance[]) => void;
|
|
56
57
|
removePlugin: (pluginName: string) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
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.0.
|
|
49
|
+
"@rspack/core": "~1.0.13",
|
|
50
50
|
"@rspack/lite-tapable": "~1.0.1",
|
|
51
51
|
"@swc/helpers": "^0.5.13",
|
|
52
52
|
"core-js": "~3.38.1"
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"dotenv": "16.4.5",
|
|
69
69
|
"dotenv-expand": "11.0.6",
|
|
70
70
|
"fs-extra": "^11.2.0",
|
|
71
|
-
"html-rspack-plugin": "6.0.
|
|
71
|
+
"html-rspack-plugin": "6.0.2",
|
|
72
72
|
"http-proxy-middleware": "^2.0.6",
|
|
73
73
|
"jiti": "^1.21.6",
|
|
74
74
|
"launch-editor-middleware": "^2.9.1",
|