@rsbuild/core 1.1.8 → 1.1.9
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/postcss-loader/index.js +8 -8
- package/compiled/rsbuild-dev-middleware/index.js +25 -25
- package/compiled/style-loader/index.js +10 -10
- package/dist/index.cjs +44 -40
- package/dist/index.js +44 -40
- package/dist-types/server/environment.d.ts +1 -0
- package/dist-types/types/config.d.ts +8 -2
- package/package.json +4 -4
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
2928: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const loader = __nccwpck_require__(
|
|
5
|
+
const loader = __nccwpck_require__(7041);
|
|
6
6
|
module.exports = loader.default;
|
|
7
7
|
module.exports.defaultGetLocalIdent =
|
|
8
|
-
__nccwpck_require__(
|
|
8
|
+
__nccwpck_require__(922).defaultGetLocalIdent;
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
7041: (__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__(1861));
|
|
18
|
+
var _plugins = __nccwpck_require__(6197);
|
|
19
|
+
var _utils = __nccwpck_require__(922);
|
|
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
|
+
6197: (__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__(5437),
|
|
269
269
|
);
|
|
270
270
|
var _postcssIcssParser = _interopRequireDefault(
|
|
271
|
-
__nccwpck_require__(
|
|
271
|
+
__nccwpck_require__(5802),
|
|
272
272
|
);
|
|
273
|
-
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(
|
|
273
|
+
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(8103));
|
|
274
274
|
function _interopRequireDefault(obj) {
|
|
275
275
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
|
-
|
|
278
|
+
5802: (__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__(922);
|
|
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
|
+
5437: (__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__(922);
|
|
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
|
+
8103: (__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__(922);
|
|
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
|
+
922: (__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;
|
|
@@ -7968,7 +7968,7 @@
|
|
|
7968
7968
|
"use strict";
|
|
7969
7969
|
module.exports = require("util");
|
|
7970
7970
|
},
|
|
7971
|
-
|
|
7971
|
+
1861: (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__(2928);
|
|
8007
8007
|
module.exports = __webpack_exports__;
|
|
8008
8008
|
})();
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
5
|
-
module.exports = __nccwpck_require__(
|
|
4
|
+
401: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
module.exports = __nccwpck_require__(315)["default"];
|
|
6
6
|
},
|
|
7
|
-
|
|
7
|
+
315: (__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__(632));
|
|
14
|
+
var _utils = __nccwpck_require__(152);
|
|
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
|
+
152: (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
|
+
632: (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__(401);
|
|
740
740
|
module.exports = __webpack_exports__;
|
|
741
741
|
})();
|
|
@@ -4417,14 +4417,14 @@
|
|
|
4417
4417
|
return a.start - b.start;
|
|
4418
4418
|
}
|
|
4419
4419
|
},
|
|
4420
|
-
|
|
4420
|
+
5936: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4421
4421
|
"use strict";
|
|
4422
|
-
const middleware = __nccwpck_require__(
|
|
4423
|
-
const getFilenameFromUrl = __nccwpck_require__(
|
|
4424
|
-
const setupHooks = __nccwpck_require__(
|
|
4425
|
-
const setupWriteToDisk = __nccwpck_require__(
|
|
4426
|
-
const setupOutputFileSystem = __nccwpck_require__(
|
|
4427
|
-
const ready = __nccwpck_require__(
|
|
4422
|
+
const middleware = __nccwpck_require__(8537);
|
|
4423
|
+
const getFilenameFromUrl = __nccwpck_require__(1953);
|
|
4424
|
+
const setupHooks = __nccwpck_require__(6839);
|
|
4425
|
+
const setupWriteToDisk = __nccwpck_require__(1061);
|
|
4426
|
+
const setupOutputFileSystem = __nccwpck_require__(3693);
|
|
4427
|
+
const ready = __nccwpck_require__(4508);
|
|
4428
4428
|
const noop = () => {};
|
|
4429
4429
|
function wdm(compiler, options = {}) {
|
|
4430
4430
|
const context = {
|
|
@@ -4479,14 +4479,14 @@
|
|
|
4479
4479
|
}
|
|
4480
4480
|
module.exports = wdm;
|
|
4481
4481
|
},
|
|
4482
|
-
|
|
4482
|
+
8537: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4483
4483
|
"use strict";
|
|
4484
4484
|
const mrmime = __nccwpck_require__(802);
|
|
4485
4485
|
const onFinishedStream = __nccwpck_require__(8772);
|
|
4486
|
-
const getFilenameFromUrl = __nccwpck_require__(
|
|
4487
|
-
const ready = __nccwpck_require__(
|
|
4488
|
-
const parseTokenList = __nccwpck_require__(
|
|
4489
|
-
const memorize = __nccwpck_require__(
|
|
4486
|
+
const getFilenameFromUrl = __nccwpck_require__(1953);
|
|
4487
|
+
const ready = __nccwpck_require__(4508);
|
|
4488
|
+
const parseTokenList = __nccwpck_require__(6558);
|
|
4489
|
+
const memorize = __nccwpck_require__(5290);
|
|
4490
4490
|
async function getEtag(stat) {
|
|
4491
4491
|
const mtime = stat.mtime.getTime().toString(16);
|
|
4492
4492
|
const size = stat.size.toString(16);
|
|
@@ -4578,7 +4578,7 @@
|
|
|
4578
4578
|
return;
|
|
4579
4579
|
}
|
|
4580
4580
|
function sendError(status, options) {
|
|
4581
|
-
const escapeHtml = __nccwpck_require__(
|
|
4581
|
+
const escapeHtml = __nccwpck_require__(5820);
|
|
4582
4582
|
const content = statuses[status] || String(status);
|
|
4583
4583
|
const document = Buffer.from(
|
|
4584
4584
|
`<!DOCTYPE html>\n<html lang="en">\n<head>\n<meta charset="utf-8">\n<title>Error</title>\n</head>\n<body>\n<pre>${escapeHtml(content)}</pre>\n</body>\n</html>`,
|
|
@@ -4883,7 +4883,7 @@
|
|
|
4883
4883
|
}
|
|
4884
4884
|
module.exports = wrapper;
|
|
4885
4885
|
},
|
|
4886
|
-
|
|
4886
|
+
5820: (module) => {
|
|
4887
4887
|
"use strict";
|
|
4888
4888
|
const matchHtmlRegExp = /["'&<>]/;
|
|
4889
4889
|
function escapeHtml(string) {
|
|
@@ -4928,13 +4928,13 @@
|
|
|
4928
4928
|
}
|
|
4929
4929
|
module.exports = escapeHtml;
|
|
4930
4930
|
},
|
|
4931
|
-
|
|
4931
|
+
1953: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4932
4932
|
"use strict";
|
|
4933
4933
|
const path = __nccwpck_require__(1017);
|
|
4934
4934
|
const { parse } = __nccwpck_require__(7310);
|
|
4935
4935
|
const querystring = __nccwpck_require__(3477);
|
|
4936
|
-
const getPaths = __nccwpck_require__(
|
|
4937
|
-
const memorize = __nccwpck_require__(
|
|
4936
|
+
const getPaths = __nccwpck_require__(1708);
|
|
4937
|
+
const memorize = __nccwpck_require__(5290);
|
|
4938
4938
|
const memoizedParse = memorize(parse, undefined, (value) => {
|
|
4939
4939
|
if (value.pathname) {
|
|
4940
4940
|
value.pathname = decode(value.pathname);
|
|
@@ -5017,7 +5017,7 @@
|
|
|
5017
5017
|
}
|
|
5018
5018
|
module.exports = getFilenameFromUrl;
|
|
5019
5019
|
},
|
|
5020
|
-
|
|
5020
|
+
1708: (module) => {
|
|
5021
5021
|
"use strict";
|
|
5022
5022
|
function getPaths(context) {
|
|
5023
5023
|
const { stats, options } = context;
|
|
@@ -5038,7 +5038,7 @@
|
|
|
5038
5038
|
}
|
|
5039
5039
|
module.exports = getPaths;
|
|
5040
5040
|
},
|
|
5041
|
-
|
|
5041
|
+
5290: (module) => {
|
|
5042
5042
|
"use strict";
|
|
5043
5043
|
const cacheStore = new WeakMap();
|
|
5044
5044
|
function memorize(fn, { cache = new Map() } = {}, callback) {
|
|
@@ -5060,7 +5060,7 @@
|
|
|
5060
5060
|
}
|
|
5061
5061
|
module.exports = memorize;
|
|
5062
5062
|
},
|
|
5063
|
-
|
|
5063
|
+
6558: (module) => {
|
|
5064
5064
|
"use strict";
|
|
5065
5065
|
function parseTokenList(str) {
|
|
5066
5066
|
let end = 0;
|
|
@@ -5093,7 +5093,7 @@
|
|
|
5093
5093
|
}
|
|
5094
5094
|
module.exports = parseTokenList;
|
|
5095
5095
|
},
|
|
5096
|
-
|
|
5096
|
+
4508: (module) => {
|
|
5097
5097
|
"use strict";
|
|
5098
5098
|
function ready(context, callback, req) {
|
|
5099
5099
|
if (context.state) {
|
|
@@ -5108,7 +5108,7 @@
|
|
|
5108
5108
|
}
|
|
5109
5109
|
module.exports = ready;
|
|
5110
5110
|
},
|
|
5111
|
-
|
|
5111
|
+
6839: (module) => {
|
|
5112
5112
|
"use strict";
|
|
5113
5113
|
function setupHooks(context) {
|
|
5114
5114
|
function invalid() {
|
|
@@ -5140,7 +5140,7 @@
|
|
|
5140
5140
|
}
|
|
5141
5141
|
module.exports = setupHooks;
|
|
5142
5142
|
},
|
|
5143
|
-
|
|
5143
|
+
3693: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5144
5144
|
"use strict";
|
|
5145
5145
|
const memfs = __nccwpck_require__(5953);
|
|
5146
5146
|
function setupOutputFileSystem(context) {
|
|
@@ -5167,7 +5167,7 @@
|
|
|
5167
5167
|
}
|
|
5168
5168
|
module.exports = setupOutputFileSystem;
|
|
5169
5169
|
},
|
|
5170
|
-
|
|
5170
|
+
1061: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5171
5171
|
"use strict";
|
|
5172
5172
|
const fs = __nccwpck_require__(7147);
|
|
5173
5173
|
const path = __nccwpck_require__(1017);
|
|
@@ -6153,6 +6153,6 @@
|
|
|
6153
6153
|
}
|
|
6154
6154
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
6155
6155
|
__nccwpck_require__.ab = __dirname + "/";
|
|
6156
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
6156
|
+
var __webpack_exports__ = __nccwpck_require__(5936);
|
|
6157
6157
|
module.exports = __webpack_exports__;
|
|
6158
6158
|
})();
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
5
|
-
const loader = __nccwpck_require__(
|
|
4
|
+
330: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
const loader = __nccwpck_require__(138);
|
|
6
6
|
module.exports = loader.default;
|
|
7
7
|
},
|
|
8
|
-
|
|
8
|
+
138: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports["default"] = void 0;
|
|
11
11
|
var _path = _interopRequireDefault(__nccwpck_require__(17));
|
|
12
|
-
var _utils = __nccwpck_require__(
|
|
13
|
-
var _options = _interopRequireDefault(__nccwpck_require__(
|
|
12
|
+
var _utils = __nccwpck_require__(282);
|
|
13
|
+
var _options = _interopRequireDefault(__nccwpck_require__(872));
|
|
14
14
|
function _interopRequireDefault(obj) {
|
|
15
15
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
16
16
|
}
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
};
|
|
105
105
|
var _default = (exports["default"] = loader);
|
|
106
106
|
},
|
|
107
|
-
|
|
107
|
+
256: (module) => {
|
|
108
108
|
function isEqualLocals(a, b, isNamedExport) {
|
|
109
109
|
if ((!a && b) || (a && !b)) {
|
|
110
110
|
return false;
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
}
|
|
131
131
|
module.exports = isEqualLocals;
|
|
132
132
|
},
|
|
133
|
-
|
|
133
|
+
282: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
134
134
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
135
135
|
exports.getExportLazyStyleCode = getExportLazyStyleCode;
|
|
136
136
|
exports.getExportStyleCode = getExportStyleCode;
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
exports.getdomAPI = getdomAPI;
|
|
152
152
|
exports.stringifyRequest = stringifyRequest;
|
|
153
153
|
var _path = _interopRequireDefault(__nccwpck_require__(17));
|
|
154
|
-
var _isEqualLocals = _interopRequireDefault(__nccwpck_require__(
|
|
154
|
+
var _isEqualLocals = _interopRequireDefault(__nccwpck_require__(256));
|
|
155
155
|
function _interopRequireDefault(obj) {
|
|
156
156
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
157
157
|
}
|
|
@@ -394,7 +394,7 @@
|
|
|
394
394
|
17: (module) => {
|
|
395
395
|
module.exports = require("path");
|
|
396
396
|
},
|
|
397
|
-
|
|
397
|
+
872: (module) => {
|
|
398
398
|
module.exports = JSON.parse(
|
|
399
399
|
'{"title":"Style Loader options","type":"object","properties":{"injectType":{"description":"Allows to setup how styles will be injected into DOM.","link":"https://github.com/webpack-contrib/style-loader#injecttype","enum":["styleTag","singletonStyleTag","autoStyleTag","lazyStyleTag","lazySingletonStyleTag","lazyAutoStyleTag","linkTag"]},"attributes":{"description":"Adds custom attributes to tag.","link":"https://github.com/webpack-contrib/style-loader#attributes","type":"object"},"insert":{"description":"Inserts `<style>`/`<link>` at the given position.","link":"https://github.com/webpack-contrib/style-loader#insert","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"base":{"description":"Sets module ID base for DLLPlugin.","link":"https://github.com/webpack-contrib/style-loader#base","type":"number"},"esModule":{"description":"Use the ES modules syntax.","link":"https://github.com/webpack-contrib/css-loader#esmodule","type":"boolean"},"styleTagTransform":{"description":"Transform tag and css when insert \'style\' tag into the DOM","link":"https://github.com/webpack-contrib/style-loader#styleTagTransform","anyOf":[{"type":"string"},{"instanceof":"Function"}]}},"additionalProperties":false}',
|
|
400
400
|
);
|
|
@@ -422,6 +422,6 @@
|
|
|
422
422
|
}
|
|
423
423
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
424
424
|
__nccwpck_require__.ab = __dirname + "/";
|
|
425
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
425
|
+
var __webpack_exports__ = __nccwpck_require__(330);
|
|
426
426
|
module.exports = __webpack_exports__;
|
|
427
427
|
})();
|
package/dist/index.cjs
CHANGED
|
@@ -79,8 +79,8 @@ var __webpack_modules__ = {
|
|
|
79
79
|
return options;
|
|
80
80
|
};
|
|
81
81
|
},
|
|
82
|
-
"../../node_modules/.pnpm/dotenv@16.4.
|
|
83
|
-
let fs = __webpack_require__("fs"), path = __webpack_require__("path"), os = __webpack_require__("os"), crypto = __webpack_require__("crypto"), version = __webpack_require__("../../node_modules/.pnpm/dotenv@16.4.
|
|
82
|
+
"../../node_modules/.pnpm/dotenv@16.4.7/node_modules/dotenv/lib/main.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
83
|
+
let fs = __webpack_require__("fs"), path = __webpack_require__("path"), os = __webpack_require__("os"), crypto = __webpack_require__("crypto"), version = __webpack_require__("../../node_modules/.pnpm/dotenv@16.4.7/node_modules/dotenv/package.json").version, LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
|
|
84
84
|
function _debug(message) {
|
|
85
85
|
console.log(`[dotenv@${version}][DEBUG] ${message}`);
|
|
86
86
|
}
|
|
@@ -1393,9 +1393,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1393
1393
|
}), similar.sort((a, b)=>a.localeCompare(b)), searchingOptions && (similar = similar.map((candidate)=>`--${candidate}`)), similar.length > 1) ? `\n(Did you mean one of ${similar.join(', ')}?)` : 1 === similar.length ? `\n(Did you mean ${similar[0]}?)` : '';
|
|
1394
1394
|
};
|
|
1395
1395
|
},
|
|
1396
|
-
"../../node_modules/.pnpm/dotenv@16.4.
|
|
1396
|
+
"../../node_modules/.pnpm/dotenv@16.4.7/node_modules/dotenv/package.json": function(module) {
|
|
1397
1397
|
"use strict";
|
|
1398
|
-
module.exports = JSON.parse('{"name":"dotenv","version":"16.4.
|
|
1398
|
+
module.exports = JSON.parse('{"name":"dotenv","version":"16.4.7","description":"Loads environment variables from .env file","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"types":"./lib/main.d.ts","require":"./lib/main.js","default":"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},"scripts":{"dts-check":"tsc --project tests/types/tsconfig.json","lint":"standard","pretest":"npm run lint && npm run dts-check","test":"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov","prerelease":"npm test","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/motdotla/dotenv.git"},"funding":"https://dotenvx.com","keywords":["dotenv","env",".env","environment","variables","config","settings"],"readmeFilename":"README.md","license":"BSD-2-Clause","devDependencies":{"@types/node":"^18.11.3","decache":"^4.6.2","sinon":"^14.0.1","standard":"^17.0.0","standard-version":"^9.5.0","tap":"^19.2.0","typescript":"^4.8.4"},"engines":{"node":">=12"},"browser":{"fs":false}}');
|
|
1399
1399
|
}
|
|
1400
1400
|
}, __webpack_module_cache__ = {};
|
|
1401
1401
|
function __webpack_require__(moduleId) {
|
|
@@ -1478,7 +1478,7 @@ var __webpack_exports__ = {};
|
|
|
1478
1478
|
}, getHTMLPlugin = ()=>(!pluginHelper_htmlPlugin && (pluginHelper_htmlPlugin = pluginHelper_require('../compiled/html-rspack-plugin/index.js')), pluginHelper_htmlPlugin), setCssExtractPlugin = (plugin)=>{
|
|
1479
1479
|
cssExtractPlugin = plugin;
|
|
1480
1480
|
}, getCssExtractPlugin = ()=>cssExtractPlugin ? cssExtractPlugin : core_default().CssExtractRspackPlugin;
|
|
1481
|
-
var external_node_fs_ = __webpack_require__("node:fs"), external_node_fs_default = __webpack_require__.n(external_node_fs_), external_node_path_ = __webpack_require__("node:path"), external_node_path_default = __webpack_require__.n(external_node_path_), main = __webpack_require__("../../node_modules/.pnpm/dotenv@16.4.
|
|
1481
|
+
var external_node_fs_ = __webpack_require__("node:fs"), external_node_fs_default = __webpack_require__.n(external_node_fs_), external_node_path_ = __webpack_require__("node:path"), external_node_path_default = __webpack_require__.n(external_node_path_), main = __webpack_require__("../../node_modules/.pnpm/dotenv@16.4.7/node_modules/dotenv/lib/main.js"), lib_main = __webpack_require__("../../node_modules/.pnpm/dotenv-expand@11.0.7/node_modules/dotenv-expand/lib/main.js"), cjs = __webpack_require__("../../node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js"), cjs_default = __webpack_require__.n(cjs);
|
|
1482
1482
|
let index_js_namespaceObject = require("../compiled/picocolors/index.js");
|
|
1483
1483
|
var index_js_default = __webpack_require__.n(index_js_namespaceObject);
|
|
1484
1484
|
let external_node_url_namespaceObject = require("node:url");
|
|
@@ -1915,6 +1915,7 @@ var __webpack_exports__ = {};
|
|
|
1915
1915
|
'output.overrideBrowserslist',
|
|
1916
1916
|
'server.open',
|
|
1917
1917
|
'server.printUrls',
|
|
1918
|
+
'resolve.extensions',
|
|
1918
1919
|
'provider'
|
|
1919
1920
|
], isOverridePath = (key)=>{
|
|
1920
1921
|
if (key.startsWith('environments.')) {
|
|
@@ -2186,7 +2187,15 @@ var __webpack_exports__ = {};
|
|
|
2186
2187
|
alias: {
|
|
2187
2188
|
'@swc/helpers': swcHelpersPath
|
|
2188
2189
|
},
|
|
2189
|
-
aliasStrategy: 'prefer-tsconfig'
|
|
2190
|
+
aliasStrategy: 'prefer-tsconfig',
|
|
2191
|
+
extensions: [
|
|
2192
|
+
'.ts',
|
|
2193
|
+
'.tsx',
|
|
2194
|
+
'.mjs',
|
|
2195
|
+
'.js',
|
|
2196
|
+
'.jsx',
|
|
2197
|
+
'.json'
|
|
2198
|
+
]
|
|
2190
2199
|
}), createDefaultConfig = ()=>({
|
|
2191
2200
|
dev: getDefaultDevConfig(),
|
|
2192
2201
|
server: getDefaultServerConfig(),
|
|
@@ -2724,7 +2733,7 @@ var __webpack_exports__ = {};
|
|
|
2724
2733
|
async function createContext(options, userConfig, bundlerType) {
|
|
2725
2734
|
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');
|
|
2726
2735
|
return {
|
|
2727
|
-
version: "1.1.
|
|
2736
|
+
version: "1.1.9",
|
|
2728
2737
|
rootPath,
|
|
2729
2738
|
distPath: '',
|
|
2730
2739
|
cachePath,
|
|
@@ -4314,28 +4323,18 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
4314
4323
|
order: 'pre',
|
|
4315
4324
|
handler: (chain, { environment, CHAIN_ID })=>{
|
|
4316
4325
|
let { config, tsconfigPath } = environment;
|
|
4317
|
-
|
|
4318
|
-
|
|
4326
|
+
chain.resolve.extensions.merge([
|
|
4327
|
+
...config.resolve.extensions
|
|
4328
|
+
]), tsconfigPath && chain.resolve.extensionAlias.merge({
|
|
4329
|
+
'.js': [
|
|
4319
4330
|
'.ts',
|
|
4320
4331
|
'.tsx',
|
|
4321
|
-
'.
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
'.
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
'.ts',
|
|
4328
|
-
'.tsx',
|
|
4329
|
-
'.js'
|
|
4330
|
-
],
|
|
4331
|
-
'.jsx': [
|
|
4332
|
-
'.tsx',
|
|
4333
|
-
'.jsx'
|
|
4334
|
-
]
|
|
4335
|
-
});
|
|
4336
|
-
}({
|
|
4337
|
-
chain,
|
|
4338
|
-
tsconfigPath
|
|
4332
|
+
'.js'
|
|
4333
|
+
],
|
|
4334
|
+
'.jsx': [
|
|
4335
|
+
'.tsx',
|
|
4336
|
+
'.jsx'
|
|
4337
|
+
]
|
|
4339
4338
|
}), !function({ chain, config, rootPath }) {
|
|
4340
4339
|
let mergedAlias = reduceConfigs({
|
|
4341
4340
|
initial: {},
|
|
@@ -4382,13 +4381,7 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
4382
4381
|
chain,
|
|
4383
4382
|
config,
|
|
4384
4383
|
rootPath: api.context.rootPath
|
|
4385
|
-
}),
|
|
4386
|
-
chain.module.rule(CHAIN_ID.RULE.MJS).test(/\.m?js/).resolve.set('fullySpecified', !1);
|
|
4387
|
-
}({
|
|
4388
|
-
chain,
|
|
4389
|
-
config,
|
|
4390
|
-
CHAIN_ID
|
|
4391
|
-
});
|
|
4384
|
+
}), chain.module.rule(CHAIN_ID.RULE.MJS).test(/\.m?js/).resolve.set('fullySpecified', !1);
|
|
4392
4385
|
let aliasStrategy = config.source.aliasStrategy ?? config.resolve.aliasStrategy;
|
|
4393
4386
|
tsconfigPath && 'rspack' === api.context.bundlerType && 'prefer-tsconfig' === aliasStrategy && chain.resolve.tsConfig({
|
|
4394
4387
|
configFile: tsconfigPath,
|
|
@@ -5899,6 +5892,17 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
5899
5892
|
if (!htmlPath) throw Error(`[rsbuild:getTransformedHtml] Failed to get HTML file by entryName: "${entryName}"`);
|
|
5900
5893
|
let fileName = (0, external_node_path_.join)(distPath, htmlPath);
|
|
5901
5894
|
return utils.readFileSync(fileName);
|
|
5895
|
+
}, createCacheableFunction = (getter)=>{
|
|
5896
|
+
let cache = new WeakMap();
|
|
5897
|
+
return async (stats, entryName, utils)=>{
|
|
5898
|
+
let cachedEntries = cache.get(stats);
|
|
5899
|
+
if (null == cachedEntries ? void 0 : cachedEntries[entryName]) return cachedEntries[entryName];
|
|
5900
|
+
let res = await getter(stats, entryName, utils);
|
|
5901
|
+
return cache.set(stats, {
|
|
5902
|
+
...cachedEntries || {},
|
|
5903
|
+
[entryName]: res
|
|
5904
|
+
}), res;
|
|
5905
|
+
};
|
|
5902
5906
|
}, ENCODING_REGEX = /\bgzip\b/, CONTENT_TYPE_REGEX = /text|javascript|\/json|xml/i, shouldCompress = (res)=>{
|
|
5903
5907
|
if (res.getHeader('Content-Encoding')) return !1;
|
|
5904
5908
|
let contentType = String(res.getHeader('Content-Type'));
|
|
@@ -6270,18 +6274,18 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
6270
6274
|
server: config.server,
|
|
6271
6275
|
compileMiddlewareAPI,
|
|
6272
6276
|
root
|
|
6273
|
-
}), readFileSync = (fileName)=>'readFileSync' in outputFileSystem ? outputFileSystem.readFileSync(fileName, 'utf-8') : external_node_fs_default().readFileSync(fileName, 'utf-8'), environmentAPI = Object.fromEntries(Object.entries(options.context.environments).map(([name, environment])=>[
|
|
6277
|
+
}), readFileSync = (fileName)=>'readFileSync' in outputFileSystem ? outputFileSystem.readFileSync(fileName, 'utf-8') : external_node_fs_default().readFileSync(fileName, 'utf-8'), cacheableLoadBundle = createCacheableFunction(loadBundle), cacheableTransformedHtml = createCacheableFunction((_stats, entryName, utils)=>getTransformedHtml(entryName, utils)), environmentAPI = Object.fromEntries(Object.entries(options.context.environments).map(([name, environment])=>[
|
|
6274
6278
|
name,
|
|
6275
6279
|
{
|
|
6276
6280
|
getStats: async ()=>{
|
|
6277
6281
|
if (!runCompile) throw Error('[rsbuild:server] Can not get stats info when "runCompile" is false');
|
|
6278
6282
|
return await waitFirstCompileDone, lastStats[environment.index];
|
|
6279
6283
|
},
|
|
6280
|
-
loadBundle: async (entryName)=>(await waitFirstCompileDone,
|
|
6284
|
+
loadBundle: async (entryName)=>(await waitFirstCompileDone, cacheableLoadBundle(lastStats[environment.index], entryName, {
|
|
6281
6285
|
readFileSync,
|
|
6282
6286
|
environment
|
|
6283
6287
|
})),
|
|
6284
|
-
getTransformedHtml: async (entryName)=>(await waitFirstCompileDone,
|
|
6288
|
+
getTransformedHtml: async (entryName)=>(await waitFirstCompileDone, cacheableTransformedHtml(lastStats[environment.index], entryName, {
|
|
6285
6289
|
readFileSync,
|
|
6286
6290
|
environment
|
|
6287
6291
|
}))
|
|
@@ -7039,11 +7043,11 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
7039
7043
|
}
|
|
7040
7044
|
}(), process.title = 'rsbuild-node';
|
|
7041
7045
|
let { npm_execpath } = process.env;
|
|
7042
|
-
(!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), rslog_index_js_namespaceObject.logger.greet(` Rsbuild v1.1.
|
|
7046
|
+
(!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), rslog_index_js_namespaceObject.logger.greet(` Rsbuild v1.1.9\n`);
|
|
7043
7047
|
}();
|
|
7044
7048
|
try {
|
|
7045
7049
|
!function() {
|
|
7046
|
-
program.name('rsbuild').usage('<command> [options]').version("1.1.
|
|
7050
|
+
program.name('rsbuild').usage('<command> [options]').version("1.1.9");
|
|
7047
7051
|
let devCommand = program.command('dev'), buildCommand = program.command('build'), previewCommand = program.command('preview'), inspectCommand = program.command('inspect');
|
|
7048
7052
|
[
|
|
7049
7053
|
devCommand,
|
|
@@ -7102,7 +7106,7 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
7102
7106
|
rslog_index_js_namespaceObject.logger.error('Failed to start Rsbuild CLI.'), rslog_index_js_namespaceObject.logger.error(err);
|
|
7103
7107
|
}
|
|
7104
7108
|
}
|
|
7105
|
-
let src_rslib_entry_version = "1.1.
|
|
7109
|
+
let src_rslib_entry_version = "1.1.9";
|
|
7106
7110
|
})();
|
|
7107
7111
|
var __webpack_export_target__ = exports;
|
|
7108
7112
|
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
package/dist/index.js
CHANGED
|
@@ -104,8 +104,8 @@ var EsmMode, __webpack_modules__ = {
|
|
|
104
104
|
return options;
|
|
105
105
|
};
|
|
106
106
|
},
|
|
107
|
-
"../../node_modules/.pnpm/dotenv@16.4.
|
|
108
|
-
let fs = __webpack_require__("fs"), path = __webpack_require__("path"), os = __webpack_require__("os"), crypto = __webpack_require__("crypto"), version = __webpack_require__("../../node_modules/.pnpm/dotenv@16.4.
|
|
107
|
+
"../../node_modules/.pnpm/dotenv@16.4.7/node_modules/dotenv/lib/main.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
108
|
+
let fs = __webpack_require__("fs"), path = __webpack_require__("path"), os = __webpack_require__("os"), crypto = __webpack_require__("crypto"), version = __webpack_require__("../../node_modules/.pnpm/dotenv@16.4.7/node_modules/dotenv/package.json").version, LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
|
|
109
109
|
function _debug(message) {
|
|
110
110
|
console.log(`[dotenv@${version}][DEBUG] ${message}`);
|
|
111
111
|
}
|
|
@@ -1333,8 +1333,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1333
1333
|
}), similar.sort((a, b)=>a.localeCompare(b)), searchingOptions && (similar = similar.map((candidate)=>`--${candidate}`)), similar.length > 1) ? `\n(Did you mean one of ${similar.join(', ')}?)` : 1 === similar.length ? `\n(Did you mean ${similar[0]}?)` : '';
|
|
1334
1334
|
};
|
|
1335
1335
|
},
|
|
1336
|
-
"../../node_modules/.pnpm/dotenv@16.4.
|
|
1337
|
-
module.exports = JSON.parse('{"name":"dotenv","version":"16.4.
|
|
1336
|
+
"../../node_modules/.pnpm/dotenv@16.4.7/node_modules/dotenv/package.json": function(module) {
|
|
1337
|
+
module.exports = JSON.parse('{"name":"dotenv","version":"16.4.7","description":"Loads environment variables from .env file","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"types":"./lib/main.d.ts","require":"./lib/main.js","default":"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},"scripts":{"dts-check":"tsc --project tests/types/tsconfig.json","lint":"standard","pretest":"npm run lint && npm run dts-check","test":"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov","prerelease":"npm test","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/motdotla/dotenv.git"},"funding":"https://dotenvx.com","keywords":["dotenv","env",".env","environment","variables","config","settings"],"readmeFilename":"README.md","license":"BSD-2-Clause","devDependencies":{"@types/node":"^18.11.3","decache":"^4.6.2","sinon":"^14.0.1","standard":"^17.0.0","standard-version":"^9.5.0","tap":"^19.2.0","typescript":"^4.8.4"},"engines":{"node":">=12"},"browser":{"fs":false}}');
|
|
1338
1338
|
}
|
|
1339
1339
|
}, __webpack_module_cache__ = {};
|
|
1340
1340
|
function __webpack_require__(moduleId) {
|
|
@@ -1396,7 +1396,7 @@ let pluginHelper_require = (0, __WEBPACK_EXTERNAL_MODULE_node_module__.createReq
|
|
|
1396
1396
|
}, getHTMLPlugin = ()=>(!pluginHelper_htmlPlugin && (pluginHelper_htmlPlugin = pluginHelper_require('../compiled/html-rspack-plugin/index.js')), pluginHelper_htmlPlugin), setCssExtractPlugin = (plugin)=>{
|
|
1397
1397
|
cssExtractPlugin = plugin;
|
|
1398
1398
|
}, getCssExtractPlugin = ()=>cssExtractPlugin ? cssExtractPlugin : __WEBPACK_EXTERNAL_MODULE__rspack_core__.default.CssExtractRspackPlugin;
|
|
1399
|
-
var external_node_fs_ = __webpack_require__("node:fs"), external_node_path_ = __webpack_require__("node:path"), main = __webpack_require__("../../node_modules/.pnpm/dotenv@16.4.
|
|
1399
|
+
var external_node_fs_ = __webpack_require__("node:fs"), external_node_path_ = __webpack_require__("node:path"), main = __webpack_require__("../../node_modules/.pnpm/dotenv@16.4.7/node_modules/dotenv/lib/main.js"), lib_main = __webpack_require__("../../node_modules/.pnpm/dotenv-expand@11.0.7/node_modules/dotenv-expand/lib/main.js"), cjs = __webpack_require__("../../node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js"), cjs_default = __webpack_require__.n(cjs);
|
|
1400
1400
|
let constants_filename = (0, __WEBPACK_EXTERNAL_MODULE_node_url__.fileURLToPath)(import.meta.url), constants_dirname = (0, external_node_path_.dirname)(constants_filename), ROOT_DIST_DIR = 'dist', LOADER_PATH = (0, external_node_path_.join)(constants_dirname), STATIC_PATH = (0, external_node_path_.join)(constants_dirname, '../static'), COMPILED_PATH = (0, external_node_path_.join)(constants_dirname, '../compiled'), RSBUILD_OUTPUTS_PATH = '.rsbuild', DEFAULT_DEV_HOST = '0.0.0.0', DEFAULT_ASSET_PREFIX = '/', DEFAULT_WEB_BROWSERSLIST = [
|
|
1401
1401
|
'chrome >= 87',
|
|
1402
1402
|
'edge >= 88',
|
|
@@ -1825,6 +1825,7 @@ let configCache = {}, OVERRIDE_PATHS = [
|
|
|
1825
1825
|
'output.overrideBrowserslist',
|
|
1826
1826
|
'server.open',
|
|
1827
1827
|
'server.printUrls',
|
|
1828
|
+
'resolve.extensions',
|
|
1828
1829
|
'provider'
|
|
1829
1830
|
], isOverridePath = (key)=>{
|
|
1830
1831
|
if (key.startsWith('environments.')) {
|
|
@@ -2096,7 +2097,15 @@ let config_require = (0, __WEBPACK_EXTERNAL_MODULE_node_module__.createRequire)(
|
|
|
2096
2097
|
alias: {
|
|
2097
2098
|
'@swc/helpers': swcHelpersPath
|
|
2098
2099
|
},
|
|
2099
|
-
aliasStrategy: 'prefer-tsconfig'
|
|
2100
|
+
aliasStrategy: 'prefer-tsconfig',
|
|
2101
|
+
extensions: [
|
|
2102
|
+
'.ts',
|
|
2103
|
+
'.tsx',
|
|
2104
|
+
'.mjs',
|
|
2105
|
+
'.js',
|
|
2106
|
+
'.jsx',
|
|
2107
|
+
'.json'
|
|
2108
|
+
]
|
|
2100
2109
|
}), createDefaultConfig = ()=>({
|
|
2101
2110
|
dev: getDefaultDevConfig(),
|
|
2102
2111
|
server: getDefaultServerConfig(),
|
|
@@ -2634,7 +2643,7 @@ async function updateEnvironmentContext(context, configs) {
|
|
|
2634
2643
|
async function createContext(options, userConfig, bundlerType) {
|
|
2635
2644
|
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');
|
|
2636
2645
|
return {
|
|
2637
|
-
version: "1.1.
|
|
2646
|
+
version: "1.1.9",
|
|
2638
2647
|
rootPath,
|
|
2639
2648
|
distPath: '',
|
|
2640
2649
|
cachePath,
|
|
@@ -4216,28 +4225,18 @@ let getJsAsyncPath = (jsPath, isServer, jsAsync)=>void 0 !== jsAsync ? jsAsync :
|
|
|
4216
4225
|
order: 'pre',
|
|
4217
4226
|
handler: (chain, { environment, CHAIN_ID })=>{
|
|
4218
4227
|
let { config, tsconfigPath } = environment;
|
|
4219
|
-
|
|
4220
|
-
|
|
4228
|
+
chain.resolve.extensions.merge([
|
|
4229
|
+
...config.resolve.extensions
|
|
4230
|
+
]), tsconfigPath && chain.resolve.extensionAlias.merge({
|
|
4231
|
+
'.js': [
|
|
4221
4232
|
'.ts',
|
|
4222
4233
|
'.tsx',
|
|
4223
|
-
'.
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
'.
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
'.ts',
|
|
4230
|
-
'.tsx',
|
|
4231
|
-
'.js'
|
|
4232
|
-
],
|
|
4233
|
-
'.jsx': [
|
|
4234
|
-
'.tsx',
|
|
4235
|
-
'.jsx'
|
|
4236
|
-
]
|
|
4237
|
-
});
|
|
4238
|
-
}({
|
|
4239
|
-
chain,
|
|
4240
|
-
tsconfigPath
|
|
4234
|
+
'.js'
|
|
4235
|
+
],
|
|
4236
|
+
'.jsx': [
|
|
4237
|
+
'.tsx',
|
|
4238
|
+
'.jsx'
|
|
4239
|
+
]
|
|
4241
4240
|
}), !function({ chain, config, rootPath }) {
|
|
4242
4241
|
let mergedAlias = reduceConfigs({
|
|
4243
4242
|
initial: {},
|
|
@@ -4284,13 +4283,7 @@ let getJsAsyncPath = (jsPath, isServer, jsAsync)=>void 0 !== jsAsync ? jsAsync :
|
|
|
4284
4283
|
chain,
|
|
4285
4284
|
config,
|
|
4286
4285
|
rootPath: api.context.rootPath
|
|
4287
|
-
}),
|
|
4288
|
-
chain.module.rule(CHAIN_ID.RULE.MJS).test(/\.m?js/).resolve.set('fullySpecified', !1);
|
|
4289
|
-
}({
|
|
4290
|
-
chain,
|
|
4291
|
-
config,
|
|
4292
|
-
CHAIN_ID
|
|
4293
|
-
});
|
|
4286
|
+
}), chain.module.rule(CHAIN_ID.RULE.MJS).test(/\.m?js/).resolve.set('fullySpecified', !1);
|
|
4294
4287
|
let aliasStrategy = config.source.aliasStrategy ?? config.resolve.aliasStrategy;
|
|
4295
4288
|
tsconfigPath && 'rspack' === api.context.bundlerType && 'prefer-tsconfig' === aliasStrategy && chain.resolve.tsConfig({
|
|
4296
4289
|
configFile: tsconfigPath,
|
|
@@ -5790,6 +5783,17 @@ let run = async (bundlePath, outputPath, compilerOptions, readFileSync)=>new Bas
|
|
|
5790
5783
|
if (!htmlPath) throw Error(`[rsbuild:getTransformedHtml] Failed to get HTML file by entryName: "${entryName}"`);
|
|
5791
5784
|
let fileName = (0, external_node_path_.join)(distPath, htmlPath);
|
|
5792
5785
|
return utils.readFileSync(fileName);
|
|
5786
|
+
}, createCacheableFunction = (getter)=>{
|
|
5787
|
+
let cache = new WeakMap();
|
|
5788
|
+
return async (stats, entryName, utils)=>{
|
|
5789
|
+
let cachedEntries = cache.get(stats);
|
|
5790
|
+
if (null == cachedEntries ? void 0 : cachedEntries[entryName]) return cachedEntries[entryName];
|
|
5791
|
+
let res = await getter(stats, entryName, utils);
|
|
5792
|
+
return cache.set(stats, {
|
|
5793
|
+
...cachedEntries || {},
|
|
5794
|
+
[entryName]: res
|
|
5795
|
+
}), res;
|
|
5796
|
+
};
|
|
5793
5797
|
}, ENCODING_REGEX = /\bgzip\b/, CONTENT_TYPE_REGEX = /text|javascript|\/json|xml/i, shouldCompress = (res)=>{
|
|
5794
5798
|
if (res.getHeader('Content-Encoding')) return !1;
|
|
5795
5799
|
let contentType = String(res.getHeader('Content-Type'));
|
|
@@ -6161,18 +6165,18 @@ async function devServer_createDevServer(options, createCompiler, config, { comp
|
|
|
6161
6165
|
server: config.server,
|
|
6162
6166
|
compileMiddlewareAPI,
|
|
6163
6167
|
root
|
|
6164
|
-
}), readFileSync = (fileName)=>'readFileSync' in outputFileSystem ? outputFileSystem.readFileSync(fileName, 'utf-8') : external_node_fs_.default.readFileSync(fileName, 'utf-8'), environmentAPI = Object.fromEntries(Object.entries(options.context.environments).map(([name, environment])=>[
|
|
6168
|
+
}), readFileSync = (fileName)=>'readFileSync' in outputFileSystem ? outputFileSystem.readFileSync(fileName, 'utf-8') : external_node_fs_.default.readFileSync(fileName, 'utf-8'), cacheableLoadBundle = createCacheableFunction(loadBundle), cacheableTransformedHtml = createCacheableFunction((_stats, entryName, utils)=>getTransformedHtml(entryName, utils)), environmentAPI = Object.fromEntries(Object.entries(options.context.environments).map(([name, environment])=>[
|
|
6165
6169
|
name,
|
|
6166
6170
|
{
|
|
6167
6171
|
getStats: async ()=>{
|
|
6168
6172
|
if (!runCompile) throw Error('[rsbuild:server] Can not get stats info when "runCompile" is false');
|
|
6169
6173
|
return await waitFirstCompileDone, lastStats[environment.index];
|
|
6170
6174
|
},
|
|
6171
|
-
loadBundle: async (entryName)=>(await waitFirstCompileDone,
|
|
6175
|
+
loadBundle: async (entryName)=>(await waitFirstCompileDone, cacheableLoadBundle(lastStats[environment.index], entryName, {
|
|
6172
6176
|
readFileSync,
|
|
6173
6177
|
environment
|
|
6174
6178
|
})),
|
|
6175
|
-
getTransformedHtml: async (entryName)=>(await waitFirstCompileDone,
|
|
6179
|
+
getTransformedHtml: async (entryName)=>(await waitFirstCompileDone, cacheableTransformedHtml(lastStats[environment.index], entryName, {
|
|
6176
6180
|
readFileSync,
|
|
6177
6181
|
environment
|
|
6178
6182
|
}))
|
|
@@ -6930,11 +6934,11 @@ async function runCLI() {
|
|
|
6930
6934
|
}
|
|
6931
6935
|
}(), process.title = 'rsbuild-node';
|
|
6932
6936
|
let { npm_execpath } = process.env;
|
|
6933
|
-
(!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.
|
|
6937
|
+
(!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.9\n`);
|
|
6934
6938
|
}();
|
|
6935
6939
|
try {
|
|
6936
6940
|
!function() {
|
|
6937
|
-
program.name('rsbuild').usage('<command> [options]').version("1.1.
|
|
6941
|
+
program.name('rsbuild').usage('<command> [options]').version("1.1.9");
|
|
6938
6942
|
let devCommand = program.command('dev'), buildCommand = program.command('build'), previewCommand = program.command('preview'), inspectCommand = program.command('inspect');
|
|
6939
6943
|
[
|
|
6940
6944
|
devCommand,
|
|
@@ -6993,6 +6997,6 @@ async function runCLI() {
|
|
|
6993
6997
|
__WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js__.logger.error('Failed to start Rsbuild CLI.'), __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js__.logger.error(err);
|
|
6994
6998
|
}
|
|
6995
6999
|
}
|
|
6996
|
-
let src_version = "1.1.
|
|
7000
|
+
let src_version = "1.1.9";
|
|
6997
7001
|
var __webpack_exports__logger = __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js__.logger, __webpack_exports__rspack = __WEBPACK_EXTERNAL_MODULE__rspack_core__.rspack;
|
|
6998
7002
|
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 };
|
|
@@ -5,3 +5,4 @@ export type ServerUtils = {
|
|
|
5
5
|
};
|
|
6
6
|
export declare const loadBundle: <T>(stats: Rspack.Stats, entryName: string, utils: ServerUtils) => Promise<T>;
|
|
7
7
|
export declare const getTransformedHtml: (entryName: string, utils: ServerUtils) => Promise<string>;
|
|
8
|
+
export declare const createCacheableFunction: <T>(getter: (stats: Rspack.Stats, entryName: string, utils: ServerUtils) => Promise<T>) => (stats: Rspack.Stats, entryName: string, utils: ServerUtils) => Promise<T>;
|
|
@@ -1115,7 +1115,7 @@ export interface DevConfig {
|
|
|
1115
1115
|
* @param shortcuts - The default CLI shortcuts.
|
|
1116
1116
|
* @returns - The customized CLI shortcuts.
|
|
1117
1117
|
*/
|
|
1118
|
-
custom?: (shortcuts
|
|
1118
|
+
custom?: (shortcuts: CliShortcut[]) => CliShortcut[];
|
|
1119
1119
|
/**
|
|
1120
1120
|
* Whether to print the help hint when the server is started.
|
|
1121
1121
|
* @default true
|
|
@@ -1161,8 +1161,14 @@ export interface ResolveConfig {
|
|
|
1161
1161
|
* @default 'prefer-tsconfig'
|
|
1162
1162
|
*/
|
|
1163
1163
|
aliasStrategy?: AliasStrategy;
|
|
1164
|
+
/**
|
|
1165
|
+
* Automatically resolve file extensions when importing modules.
|
|
1166
|
+
* This means you can import files without explicitly writing their extensions.
|
|
1167
|
+
* @default ['.ts', '.tsx', '.mjs', '.js', '.jsx', '.json']
|
|
1168
|
+
*/
|
|
1169
|
+
extensions?: string[];
|
|
1164
1170
|
}
|
|
1165
|
-
export type NormalizedResolveConfig = ResolveConfig & Pick<Required<ResolveConfig>, 'alias' | 'aliasStrategy'>;
|
|
1171
|
+
export type NormalizedResolveConfig = ResolveConfig & Pick<Required<ResolveConfig>, 'alias' | 'aliasStrategy' | 'extensions'>;
|
|
1166
1172
|
export type ModuleFederationConfig = {
|
|
1167
1173
|
options: ModuleFederationPluginOptions;
|
|
1168
1174
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
4
4
|
"description": "The Rspack-based build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"bugs": {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"core-js": "~3.39.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@rslib/core": "0.1.
|
|
55
|
+
"@rslib/core": "0.1.3",
|
|
56
56
|
"@types/connect": "3.4.38",
|
|
57
57
|
"@types/node": "^22.10.1",
|
|
58
58
|
"@types/on-finished": "2.3.4",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"connect-history-api-fallback": "^2.0.0",
|
|
66
66
|
"css-loader": "7.1.2",
|
|
67
67
|
"deepmerge": "^4.3.1",
|
|
68
|
-
"dotenv": "16.4.
|
|
68
|
+
"dotenv": "16.4.7",
|
|
69
69
|
"dotenv-expand": "11.0.7",
|
|
70
70
|
"html-rspack-plugin": "6.0.2",
|
|
71
71
|
"http-proxy-middleware": "^2.0.6",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"style-loader": "3.3.4",
|
|
89
89
|
"tinyglobby": "^0.2.10",
|
|
90
90
|
"typescript": "^5.7.2",
|
|
91
|
-
"webpack": "^5.
|
|
91
|
+
"webpack": "^5.97.1",
|
|
92
92
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
93
93
|
"webpack-merge": "6.0.1",
|
|
94
94
|
"ws": "^8.18.0"
|