@rsbuild/core 2.2.0 → 2.2.2
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 +2 -2
- package/compiled/css-loader/package.json +1 -1
- package/compiled/html-rspack-plugin/index.js +16 -16
- package/compiled/postcss/index.js +1 -1
- package/compiled/postcss-loader/index.js +6 -6
- package/compiled/style-loader/index.js +10 -10
- package/dist/626.js +45 -37
- package/dist/cors.js +5 -5
- package/dist/http-proxy-middleware.js +4 -4
- package/dist/launch-editor-middleware.js +1 -1
- package/dist/manifest-plugin.js +1 -1
- package/dist/memfs.js +1 -1
- package/dist/open.js +2 -2
- package/dist/range-parser.js +2 -2
- package/dist/tinyglobby.js +1 -1
- package/dist/types/config.d.ts +1 -1
- package/dist/types/context.d.ts +1 -1
- package/dist/types/plugin.d.ts +1 -1
- package/dist/ws.js +2 -2
- package/package.json +5 -5
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
5
|
-
const loader = __nccwpck_require__(
|
|
4
|
+
511: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
const loader = __nccwpck_require__(153);
|
|
6
6
|
module.exports = loader.default;
|
|
7
7
|
},
|
|
8
|
-
|
|
8
|
+
153: (__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__(928));
|
|
12
|
-
var _utils = __nccwpck_require__(
|
|
13
|
-
var _options = _interopRequireDefault(__nccwpck_require__(
|
|
12
|
+
var _utils = __nccwpck_require__(420);
|
|
13
|
+
var _options = _interopRequireDefault(__nccwpck_require__(224));
|
|
14
14
|
function _interopRequireDefault(obj) {
|
|
15
15
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
16
16
|
}
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
};
|
|
96
96
|
var _default = (exports["default"] = loader);
|
|
97
97
|
},
|
|
98
|
-
|
|
98
|
+
790: (module) => {
|
|
99
99
|
function isEqualLocals(a, b, isNamedExport) {
|
|
100
100
|
if ((!a && b) || (a && !b)) {
|
|
101
101
|
return false;
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
}
|
|
122
122
|
module.exports = isEqualLocals;
|
|
123
123
|
},
|
|
124
|
-
|
|
124
|
+
420: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
125
125
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
126
126
|
exports.getExportLazyStyleCode = getExportLazyStyleCode;
|
|
127
127
|
exports.getExportStyleCode = getExportStyleCode;
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
exports.getdomAPI = getdomAPI;
|
|
143
143
|
exports.stringifyRequest = stringifyRequest;
|
|
144
144
|
var _path = _interopRequireDefault(__nccwpck_require__(928));
|
|
145
|
-
var _isEqualLocals = _interopRequireDefault(__nccwpck_require__(
|
|
145
|
+
var _isEqualLocals = _interopRequireDefault(__nccwpck_require__(790));
|
|
146
146
|
function _interopRequireDefault(obj) {
|
|
147
147
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
148
148
|
}
|
|
@@ -337,7 +337,7 @@
|
|
|
337
337
|
928: (module) => {
|
|
338
338
|
module.exports = require("path");
|
|
339
339
|
},
|
|
340
|
-
|
|
340
|
+
224: (module) => {
|
|
341
341
|
module.exports = JSON.parse(
|
|
342
342
|
'{"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","type":"string"},"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","type":"string"}},"additionalProperties":false}',
|
|
343
343
|
);
|
|
@@ -365,6 +365,6 @@
|
|
|
365
365
|
}
|
|
366
366
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
367
367
|
__nccwpck_require__.ab = __dirname + "/";
|
|
368
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
368
|
+
var __webpack_exports__ = __nccwpck_require__(511);
|
|
369
369
|
module.exports = __webpack_exports__;
|
|
370
370
|
})();
|
package/dist/626.js
CHANGED
|
@@ -16,7 +16,7 @@ import { __webpack_require__ } from "./rslib-runtime.js";
|
|
|
16
16
|
var superClass, superClass1, __rspack_import_meta_filename__ = __rspack_fileURLToPath(import.meta.url);
|
|
17
17
|
let __rspack_createRequire_require = __rspack_createRequire(import.meta.url);
|
|
18
18
|
__webpack_require__.add({
|
|
19
|
-
"
|
|
19
|
+
"../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/deepmerge/4.3.1/56471899410038644780b3527c5076e78d3f57091a0da3ac0daf6d994929353d/node_modules/deepmerge/dist/cjs.js" (module) {
|
|
20
20
|
var isMergeableObject = function isMergeableObject(value) {
|
|
21
21
|
return isNonNullObject(value) && !isSpecial(value);
|
|
22
22
|
};
|
|
@@ -85,7 +85,7 @@ __webpack_require__.add({
|
|
|
85
85
|
}, {});
|
|
86
86
|
}, module.exports = deepmerge;
|
|
87
87
|
},
|
|
88
|
-
"
|
|
88
|
+
"../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/dotenv-expand/13.0.0/1d3d360f4c41ed89366b79ec2c361d16e6aee7ab6c47163ea4f3718f7f78cc4c/node_modules/dotenv-expand/lib/main.js" (module) {
|
|
89
89
|
function _resolveEscapeSequences(value) {
|
|
90
90
|
return value.replace(/\\\$/g, '$');
|
|
91
91
|
}
|
|
@@ -118,7 +118,7 @@ __webpack_require__.add({
|
|
|
118
118
|
}
|
|
119
119
|
module.exports.f = expand;
|
|
120
120
|
},
|
|
121
|
-
"
|
|
121
|
+
"../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ee-first/1.1.1/7d7aff2abffb03f454b885edc2f03bd078376c8cde75af0c324753fee26268de/node_modules/ee-first/index.js" (module) {
|
|
122
122
|
function listener(event, done) {
|
|
123
123
|
return function onevent(arg1) {
|
|
124
124
|
for(var args = Array(arguments.length), i = 0; i < args.length; i++)args[i] = arguments[i];
|
|
@@ -151,7 +151,7 @@ __webpack_require__.add({
|
|
|
151
151
|
return thunk.cancel = cleanup, thunk;
|
|
152
152
|
};
|
|
153
153
|
},
|
|
154
|
-
"
|
|
154
|
+
"../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/lilconfig/3.1.3/8e9a79516bf61f8427342cef50cdad2cdc2572f42288ba8053b88eadfdc0ebef/node_modules/lilconfig/src/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
155
155
|
let path = __webpack_require__("path?37f5"), fs = __webpack_require__("fs?cdbd"), os = __webpack_require__("os"), url = __webpack_require__("url?5f07"), fsReadFileAsync = fs.promises.readFile;
|
|
156
156
|
function getDefaultSearchPlaces(name, sync) {
|
|
157
157
|
return [
|
|
@@ -321,9 +321,9 @@ __webpack_require__.add({
|
|
|
321
321
|
};
|
|
322
322
|
};
|
|
323
323
|
},
|
|
324
|
-
"
|
|
324
|
+
"../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/on-finished/2.4.1/cf4b90e733493a0ce70ba421a5b37153ad39360f9513e36b25d2e49f57047a9b/node_modules/on-finished/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
325
325
|
module.exports = onFinished, module.exports.isFinished = isFinished;
|
|
326
|
-
var asyncHooks = tryRequireAsyncHooks(), first = __webpack_require__("
|
|
326
|
+
var asyncHooks = tryRequireAsyncHooks(), first = __webpack_require__("../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ee-first/1.1.1/7d7aff2abffb03f454b885edc2f03bd078376c8cde75af0c324753fee26268de/node_modules/ee-first/index.js"), defer = 'function' == typeof setImmediate ? setImmediate : function(fn) {
|
|
327
327
|
process.nextTick(fn.bind.apply(fn, arguments));
|
|
328
328
|
};
|
|
329
329
|
function onFinished(msg, listener) {
|
|
@@ -387,8 +387,8 @@ __webpack_require__.add({
|
|
|
387
387
|
return (asyncHooks.AsyncResource && (res = new asyncHooks.AsyncResource(fn.name || 'bound-anonymous-fn')), res && res.runInAsyncScope) ? res.runInAsyncScope.bind(res, fn, null) : fn;
|
|
388
388
|
}
|
|
389
389
|
},
|
|
390
|
-
"
|
|
391
|
-
let yaml, { resolve } = __webpack_require__("node:path?815c"), config = __webpack_require__("
|
|
390
|
+
"../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/postcss-load-config/6.0.1/c9e6a20d11428465888ab8b3a063f9903a46c9842bd45d6dfecb2a0964575256/node_modules/postcss-load-config/src/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
391
|
+
let yaml, { resolve } = __webpack_require__("node:path?815c"), config = __webpack_require__("../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/lilconfig/3.1.3/8e9a79516bf61f8427342cef50cdad2cdc2572f42288ba8053b88eadfdc0ebef/node_modules/lilconfig/src/index.js"), loadOptions = __webpack_require__("../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/postcss-load-config/6.0.1/c9e6a20d11428465888ab8b3a063f9903a46c9842bd45d6dfecb2a0964575256/node_modules/postcss-load-config/src/options.js"), loadPlugins = __webpack_require__("../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/postcss-load-config/6.0.1/c9e6a20d11428465888ab8b3a063f9903a46c9842bd45d6dfecb2a0964575256/node_modules/postcss-load-config/src/plugins.js"), req = __webpack_require__("../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/postcss-load-config/6.0.1/c9e6a20d11428465888ab8b3a063f9903a46c9842bd45d6dfecb2a0964575256/node_modules/postcss-load-config/src/req.js");
|
|
392
392
|
async function processResult(ctx, result) {
|
|
393
393
|
let obj, file = result.filepath || '', projectConfig = ((obj = result.config) && obj.__esModule ? obj : {
|
|
394
394
|
default: obj
|
|
@@ -461,8 +461,8 @@ __webpack_require__.add({
|
|
|
461
461
|
});
|
|
462
462
|
};
|
|
463
463
|
},
|
|
464
|
-
"
|
|
465
|
-
let req = __webpack_require__("
|
|
464
|
+
"../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/postcss-load-config/6.0.1/c9e6a20d11428465888ab8b3a063f9903a46c9842bd45d6dfecb2a0964575256/node_modules/postcss-load-config/src/options.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
465
|
+
let req = __webpack_require__("../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/postcss-load-config/6.0.1/c9e6a20d11428465888ab8b3a063f9903a46c9842bd45d6dfecb2a0964575256/node_modules/postcss-load-config/src/req.js");
|
|
466
466
|
module.exports = async function options(config, file) {
|
|
467
467
|
if (config.parser && 'string' == typeof config.parser) try {
|
|
468
468
|
config.parser = await req(config.parser, file);
|
|
@@ -482,8 +482,8 @@ __webpack_require__.add({
|
|
|
482
482
|
return config;
|
|
483
483
|
};
|
|
484
484
|
},
|
|
485
|
-
"
|
|
486
|
-
let req = __webpack_require__("
|
|
485
|
+
"../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/postcss-load-config/6.0.1/c9e6a20d11428465888ab8b3a063f9903a46c9842bd45d6dfecb2a0964575256/node_modules/postcss-load-config/src/plugins.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
486
|
+
let req = __webpack_require__("../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/postcss-load-config/6.0.1/c9e6a20d11428465888ab8b3a063f9903a46c9842bd45d6dfecb2a0964575256/node_modules/postcss-load-config/src/req.js");
|
|
487
487
|
async function load(plugin, options, file) {
|
|
488
488
|
try {
|
|
489
489
|
if (null == options || 0 === Object.keys(options).length) return await req(plugin, file);
|
|
@@ -499,7 +499,7 @@ __webpack_require__.add({
|
|
|
499
499
|
}), list;
|
|
500
500
|
};
|
|
501
501
|
},
|
|
502
|
-
"
|
|
502
|
+
"../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/postcss-load-config/6.0.1/c9e6a20d11428465888ab8b3a063f9903a46c9842bd45d6dfecb2a0964575256/node_modules/postcss-load-config/src/req.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
503
503
|
let tsx, jiti, { createRequire } = __webpack_require__("node:module?f56b"), { pathToFileURL } = __webpack_require__("node:url?5295"), TS_EXT_RE = /\.[mc]?ts$/, importError = [];
|
|
504
504
|
module.exports = async function req(name, rootFile = __rspack_import_meta_filename__) {
|
|
505
505
|
let url = createRequire(rootFile).resolve(name);
|
|
@@ -2205,7 +2205,7 @@ class RspackChain extends ChainedMap {
|
|
|
2205
2205
|
]);
|
|
2206
2206
|
}
|
|
2207
2207
|
}
|
|
2208
|
-
let vendors_require = createRequire(import.meta.url), cjs_0 = __webpack_require__("
|
|
2208
|
+
let vendors_require = createRequire(import.meta.url), cjs_0 = __webpack_require__("../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/deepmerge/4.3.1/56471899410038644780b3527c5076e78d3f57091a0da3ac0daf6d994929353d/node_modules/deepmerge/dist/cjs.js");
|
|
2209
2209
|
var cjs_0_default = __webpack_require__.n(cjs_0);
|
|
2210
2210
|
let setNodeEnv = (env)=>{
|
|
2211
2211
|
process.env.NODE_ENV = env;
|
|
@@ -3425,7 +3425,7 @@ function createPublicContext(context) {
|
|
|
3425
3425
|
async function createContext(options, userConfig, logger, loadConfigResult) {
|
|
3426
3426
|
let { cwd } = options, rootPath = userConfig.root ? ensureAbsolutePath(cwd, userConfig.root) : cwd, rsbuildConfig = await withDefaultConfig(rootPath, userConfig), cachePath = join(rootPath, 'node_modules', '.cache'), specifiedEnvironments = options.environment && options.environment.length > 0 ? options.environment : void 0, hooks = initHooks();
|
|
3427
3427
|
return {
|
|
3428
|
-
version: "2.2.
|
|
3428
|
+
version: "2.2.2",
|
|
3429
3429
|
rootPath,
|
|
3430
3430
|
configFile: loadConfigResult?.filePath ?? userConfig._privateMeta?.configFilePath,
|
|
3431
3431
|
configFileDependencies: loadConfigResult?.dependencies ?? userConfig._privateMeta?.configFileDependencies ?? [],
|
|
@@ -4097,7 +4097,11 @@ async function createCompiler_createCompiler(options) {
|
|
|
4097
4097
|
})(version, '2.0.0') >= 0)) throw Error(`${color.dim('[rsbuild]')} The current Rspack version does not meet the requirements, the minimum supported version of Rspack is ${color.green("2.0.0")}`);
|
|
4098
4098
|
let isMultiCompiler = rspackConfigs.length > 1, compiler = isMultiCompiler ? core_rspack(rspackConfigs) : core_rspack(rspackConfigs[0]);
|
|
4099
4099
|
'true' === process.env.RSPACK_UNSAFE_FAST_DROP && (compiler.unsafeFastDrop = !0);
|
|
4100
|
-
let isVersionLogged = !1, isCompiling = !1,
|
|
4100
|
+
let isVersionLogged = !1, isCompiling = !1, hasFatalError = !1, compilers = isMultiCompiler ? compiler.compilers : [
|
|
4101
|
+
compiler
|
|
4102
|
+
], finishFatalBuild = ()=>{
|
|
4103
|
+
!hasFatalError || compilers.some((item)=>item.watching ? item.watching.running : item.running) || (context.buildState.status = 'failed', context.buildState.hasErrors = !0, isCompiling = !1);
|
|
4104
|
+
}, logRspackVersion = ()=>{
|
|
4101
4105
|
isVersionLogged || (logger.debug(`using Rspack v${core_rspack.rspackVersion}`), isVersionLogged = !0);
|
|
4102
4106
|
}, lazyModules = new Set();
|
|
4103
4107
|
compiler.hooks.infrastructureLog.tap(HOOK_NAME, (name, _, args)=>{
|
|
@@ -4113,13 +4117,16 @@ async function createCompiler_createCompiler(options) {
|
|
|
4113
4117
|
}
|
|
4114
4118
|
});
|
|
4115
4119
|
let startTime = null;
|
|
4116
|
-
compiler.hooks.run.tap(HOOK_NAME, ()=>{
|
|
4120
|
+
for (let item of (compiler.hooks.run.tap(HOOK_NAME, ()=>{
|
|
4117
4121
|
startTime = Date.now(), context.buildState.status = 'building';
|
|
4118
4122
|
}), compiler.hooks.watchRun.tap(HOOK_NAME, (compiler)=>{
|
|
4119
4123
|
startTime = Date.now(), context.buildState.status = 'building', logRspackVersion(), isCompiling || printBuildLog(compiler, context, lazyModules), lazyModules.size && lazyModules.clear(), isCompiling = !0;
|
|
4120
4124
|
}), compiler.hooks.invalid.tap(HOOK_NAME, ()=>{
|
|
4121
|
-
context.buildState.stats = null, context.buildState.status = 'idle', context.buildState.hasErrors = !1;
|
|
4122
|
-
}),
|
|
4125
|
+
hasFatalError = !1, context.buildState.stats = null, context.buildState.status = 'idle', context.buildState.hasErrors = !1;
|
|
4126
|
+
}), compilers))item.hooks.failed.tap(HOOK_NAME, ()=>{
|
|
4127
|
+
hasFatalError = !0, context.buildState.hasErrors = !0, finishFatalBuild();
|
|
4128
|
+
}), item.hooks.afterDone.tap(HOOK_NAME, finishFatalBuild), item.hooks.watchClose.tap(HOOK_NAME, finishFatalBuild);
|
|
4129
|
+
'build' === context.action && (isMultiCompiler ? compiler.compilers[0] : compiler).hooks.run.tap(HOOK_NAME, ()=>{
|
|
4123
4130
|
logger.info('build started...'), logRspackVersion();
|
|
4124
4131
|
});
|
|
4125
4132
|
let printTime = (index, hasErrors)=>{
|
|
@@ -4145,6 +4152,7 @@ async function createCompiler_createCompiler(options) {
|
|
|
4145
4152
|
printTime(index, stats.hasErrors());
|
|
4146
4153
|
});
|
|
4147
4154
|
}), compiler.hooks.done.tap(HOOK_NAME, (statsInstance)=>{
|
|
4155
|
+
hasFatalError = !1;
|
|
4148
4156
|
let stats = getRsbuildStats(statsInstance, compiler, logger, context.action), hasErrors = statsInstance.hasErrors();
|
|
4149
4157
|
context.buildState.stats = stats, context.buildState.status = 'done', context.buildState.hasErrors = hasErrors, context.socketServer?.onBuildDone();
|
|
4150
4158
|
let { message, level } = formatStats(stats, hasErrors, options.context.rootPath, logger);
|
|
@@ -4444,7 +4452,7 @@ let RSPACK_BUILD_ERROR = 'Rspack build failed.', build_build = async (initOption
|
|
|
4444
4452
|
await restartWatcher?.close(), await closeBuild();
|
|
4445
4453
|
}
|
|
4446
4454
|
};
|
|
4447
|
-
}, main = __webpack_require__("
|
|
4455
|
+
}, main = __webpack_require__("../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/dotenv-expand/13.0.0/1d3d360f4c41ed89366b79ec2c361d16e6aee7ab6c47163ea4f3718f7f78cc4c/node_modules/dotenv-expand/lib/main.js"), DOTENV_LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;
|
|
4448
4456
|
function loadEnv_parse(src) {
|
|
4449
4457
|
let match, obj = {}, lines = src.toString();
|
|
4450
4458
|
for(lines = lines.replace(/\r\n?/gm, '\n'); null != (match = DOTENV_LINE.exec(lines));){
|
|
@@ -5059,7 +5067,7 @@ function parseMinifyOptions(config) {
|
|
|
5059
5067
|
cssOptions: minify.cssOptions
|
|
5060
5068
|
};
|
|
5061
5069
|
}
|
|
5062
|
-
let postcss_load_config_src = __webpack_require__("
|
|
5070
|
+
let postcss_load_config_src = __webpack_require__("../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/postcss-load-config/6.0.1/c9e6a20d11428465888ab8b3a063f9903a46c9842bd45d6dfecb2a0964575256/node_modules/postcss-load-config/src/index.js");
|
|
5063
5071
|
var postcss_load_config_src_default = __webpack_require__.n(postcss_load_config_src);
|
|
5064
5072
|
async function getLightningCSSLoaderOptions(config, targets, minify) {
|
|
5065
5073
|
let userOptions = 'object' == typeof config.tools.lightningcssLoader ? config.tools.lightningcssLoader : {}, initialOptions = {
|
|
@@ -6636,7 +6644,7 @@ function parseTokenList(str) {
|
|
|
6636
6644
|
}
|
|
6637
6645
|
return start !== end && list.push(str.substring(start, end)), list;
|
|
6638
6646
|
}
|
|
6639
|
-
let on_finished = __webpack_require__("
|
|
6647
|
+
let on_finished = __webpack_require__("../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/on-finished/2.4.1/cf4b90e733493a0ce70ba421a5b37153ad39360f9513e36b25d2e49f57047a9b/node_modules/on-finished/index.js");
|
|
6640
6648
|
var on_finished_default = __webpack_require__.n(on_finished);
|
|
6641
6649
|
function getEtag(stat) {
|
|
6642
6650
|
let mtime = stat.mtime.getTime().toString(16), size = stat.size.toString(16);
|
|
@@ -6746,7 +6754,7 @@ function destroyStream(stream, suppress) {
|
|
|
6746
6754
|
}), 'function' == typeof stream.addListener && suppress && (stream.removeAllListeners('error'), stream.addListener('error', ()=>{}));
|
|
6747
6755
|
}
|
|
6748
6756
|
let parseRangeHeaders = async (value)=>{
|
|
6749
|
-
let { default: rangeParser } = await import("./range-parser.js").then(__webpack_require__.t.bind(__webpack_require__, "
|
|
6757
|
+
let { default: rangeParser } = await import("./range-parser.js").then(__webpack_require__.t.bind(__webpack_require__, "../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/range-parser/1.3.0/d49e5dcb9d0e39475844e240fad8cd1db6a58f4144f7ede43d9755e2fce5babc/node_modules/range-parser/index.js", 23)), [len, rangeHeader] = value.split('|');
|
|
6750
6758
|
return rangeParser(Number(len), rangeHeader, {
|
|
6751
6759
|
combine: !0
|
|
6752
6760
|
});
|
|
@@ -6853,7 +6861,7 @@ function createAssetsMiddleware(context, ready, outputFileSystem) {
|
|
|
6853
6861
|
}
|
|
6854
6862
|
async function setupOutputFileSystem(writeToDisk, compilers) {
|
|
6855
6863
|
if (!0 !== writeToDisk) {
|
|
6856
|
-
let { createFsFromVolume, Volume } = await import("./memfs.js").then(__webpack_require__.t.bind(__webpack_require__, "
|
|
6864
|
+
let { createFsFromVolume, Volume } = await import("./memfs.js").then(__webpack_require__.t.bind(__webpack_require__, "../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/memfs/4.68.2/d8cc16a375363b8e2c9837aec01c984bbb0e063db42b6702d64d750c65cbb1ff/node_modules/memfs/lib/index.js", 23)), outputFileSystem = createFsFromVolume(new Volume());
|
|
6857
6865
|
for (let compiler of compilers)compiler.outputFileSystem = outputFileSystem;
|
|
6858
6866
|
}
|
|
6859
6867
|
let compiler = compilers.find((compiler)=>!!compiler.outputFileSystem);
|
|
@@ -6977,12 +6985,12 @@ let assets_middleware_assetsMiddleware = async ({ config, compiler, context, soc
|
|
|
6977
6985
|
});
|
|
6978
6986
|
let compilers = compiler_isMultiCompiler(compiler) ? compiler.compilers : [
|
|
6979
6987
|
compiler
|
|
6980
|
-
], callbacks = []
|
|
6988
|
+
], callbacks = [], flushCallbacks = ()=>{
|
|
6989
|
+
for (let callback of callbacks.splice(0))callback();
|
|
6990
|
+
};
|
|
6981
6991
|
compiler.hooks.done.tap('rsbuild-dev-middleware', ()=>{
|
|
6982
6992
|
process.nextTick(()=>{
|
|
6983
|
-
'done' === context.buildState.status && (
|
|
6984
|
-
callback();
|
|
6985
|
-
}), callbacks.length = 0);
|
|
6993
|
+
'done' === context.buildState.status && flushCallbacks();
|
|
6986
6994
|
});
|
|
6987
6995
|
});
|
|
6988
6996
|
let writeToDisk = (config1 = config.dev, 1 === new Set(writeToDiskValues = environmentList.map((env)=>env.config.dev.writeToDisk)).size ? writeToDiskValues[0] : (filePath, name)=>{
|
|
@@ -6991,14 +6999,14 @@ let assets_middleware_assetsMiddleware = async ({ config, compiler, context, soc
|
|
|
6991
6999
|
});
|
|
6992
7000
|
writeToDisk && setupWriteToDisk(compilers, writeToDisk, logger);
|
|
6993
7001
|
let instance = createAssetsMiddleware(context, (callback)=>{
|
|
6994
|
-
'done' === context.buildState.status ? callback() : callbacks.push(callback);
|
|
7002
|
+
'done' === context.buildState.status || 'failed' === context.buildState.status ? callback() : callbacks.push(callback);
|
|
6995
7003
|
}, await setupOutputFileSystem(writeToDisk, compilers));
|
|
6996
7004
|
return instance.watch = ()=>{
|
|
6997
7005
|
if (compiler.watching) watching = compiler.watching;
|
|
6998
7006
|
else {
|
|
6999
7007
|
let watchOptions = compilers.length > 1 ? compilers.map(({ options })=>options.watchOptions || {}) : compilers[0].options.watchOptions || {};
|
|
7000
7008
|
watching = compiler.watch(watchOptions, (error)=>{
|
|
7001
|
-
error && (error.message?.includes('× Error:') && (error.message = error.message.replace('× Error:', '').trim()), logger.error(error));
|
|
7009
|
+
error && (context.buildState.status = 'failed', context.buildState.hasErrors = !0, process.nextTick(flushCallbacks), error.message?.includes('× Error:') && (error.message = error.message.replace('× Error:', '').trim()), logger.error(error));
|
|
7002
7010
|
});
|
|
7003
7011
|
}
|
|
7004
7012
|
}, instance.close = (callback = noop)=>{
|
|
@@ -7755,7 +7763,7 @@ async function createProxyMiddleware(proxyOptions, logger) {
|
|
|
7755
7763
|
let applyDefaultMiddlewares = async ({ config, buildManager, context, devServer, middlewares, postCallbacks })=>{
|
|
7756
7764
|
let launchEditorHandlerPromise, upgradeEvents = [], { server } = config, { logger } = context;
|
|
7757
7765
|
if (server.cors) {
|
|
7758
|
-
let { default: corsMiddleware } = await import("./cors.js").then(__webpack_require__.t.bind(__webpack_require__, "
|
|
7766
|
+
let { default: corsMiddleware } = await import("./cors.js").then(__webpack_require__.t.bind(__webpack_require__, "../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/cors/2.8.6/abeeebb4dd5e2293f01aa9f4c01ff28ab19103cfa7a845442d515e16cf051f35/node_modules/cors/lib/index.js", 23));
|
|
7759
7767
|
middlewares.use(corsMiddleware('boolean' == typeof server.cors ? {} : server.cors));
|
|
7760
7768
|
}
|
|
7761
7769
|
let { headers } = server;
|
|
@@ -7776,7 +7784,7 @@ let applyDefaultMiddlewares = async ({ config, buildManager, context, devServer,
|
|
|
7776
7784
|
})), middlewares.use('/__open-in-editor', async (req, res, next)=>{
|
|
7777
7785
|
try {
|
|
7778
7786
|
(await (launchEditorHandlerPromise ??= (async ()=>{
|
|
7779
|
-
let { default: launchEditorMiddleware } = await import("./launch-editor-middleware.js").then(__webpack_require__.t.bind(__webpack_require__, "
|
|
7787
|
+
let { default: launchEditorMiddleware } = await import("./launch-editor-middleware.js").then(__webpack_require__.t.bind(__webpack_require__, "../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/launch-editor-middleware/2.14.1/6d555a60526ad6844dc2673e73b564ffd44ca896ac31b809c7cc243f8e135c00/node_modules/launch-editor-middleware/index.js", 23));
|
|
7780
7788
|
return launchEditorMiddleware();
|
|
7781
7789
|
})()))(req, res, next);
|
|
7782
7790
|
} catch (err) {
|
|
@@ -8469,7 +8477,7 @@ async function startPreviewServer(context, config, { getPortSilently } = {}) {
|
|
|
8469
8477
|
outputFileSystem: node_fs
|
|
8470
8478
|
};
|
|
8471
8479
|
if (isVerbose(logger) && middlewares.use(getRequestLoggerMiddleware(logger)), cors) {
|
|
8472
|
-
let { default: corsMiddleware } = await import("./cors.js").then(__webpack_require__.t.bind(__webpack_require__, "
|
|
8480
|
+
let { default: corsMiddleware } = await import("./cors.js").then(__webpack_require__.t.bind(__webpack_require__, "../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/cors/2.8.6/abeeebb4dd5e2293f01aa9f4c01ff28ab19103cfa7a845442d515e16cf051f35/node_modules/cors/lib/index.js", 23));
|
|
8473
8481
|
middlewares.use(corsMiddleware('boolean' == typeof cors ? {} : cors));
|
|
8474
8482
|
}
|
|
8475
8483
|
if (headers && middlewares.use((_req, res, next)=>{
|
|
@@ -9658,7 +9666,7 @@ try {
|
|
|
9658
9666
|
api.modifyBundlerChain(async (chain, { CHAIN_ID, environment, isDev })=>{
|
|
9659
9667
|
let { output: { manifest }, dev: { writeToDisk } } = environment.config;
|
|
9660
9668
|
if (!1 === manifest) return;
|
|
9661
|
-
let manifestOptions = normalizeManifestObjectConfig(manifest), { RspackManifestPlugin } = await import("./manifest-plugin.js").then(__webpack_require__.bind(__webpack_require__, "
|
|
9669
|
+
let manifestOptions = normalizeManifestObjectConfig(manifest), { RspackManifestPlugin } = await import("./manifest-plugin.js").then(__webpack_require__.bind(__webpack_require__, "../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/rspack-manifest-plugin/5.2.2/e1ec5d4691c84b8859f27aa9fc2f39b9334ca010b826474dc51dc2d479e68b43/node_modules/rspack-manifest-plugin/dist/index.js")), { htmlPaths } = environment, filter = manifestOptions.filter ?? ((file)=>!file.name.endsWith('.LICENSE.txt'));
|
|
9662
9670
|
manifestFilenames.set(environment.name, manifestOptions.filename);
|
|
9663
9671
|
let pluginOptions = {
|
|
9664
9672
|
fileName: manifestOptions.filename,
|
|
@@ -10201,7 +10209,7 @@ let applyServerOptions = (command)=>{
|
|
|
10201
10209
|
};
|
|
10202
10210
|
function setupCommands(argv) {
|
|
10203
10211
|
let cli = ((name = "")=>new CAC(name))('rsbuild');
|
|
10204
|
-
cli.version("2.2.
|
|
10212
|
+
cli.version("2.2.2"), cli.option('--base <base>', 'Set the base path of the server').option('-c, --config <config>', 'Set the configuration file (relative or absolute path)').option('--config-loader <loader>', 'Set the config file loader (auto | jiti | native)', {
|
|
10205
10213
|
default: 'auto'
|
|
10206
10214
|
}).option('--dist-path <dir>', 'Set the root directory of output files').option('--source-map', 'Enable source map').option('--env-dir <dir>', 'Set the directory for loading `.env` files').option('--env-mode <mode>', 'Set the env mode to load the `.env.[mode]` file').option('--environment <name>', 'Set the environment name(s) to build', {
|
|
10207
10215
|
type: [
|
|
@@ -10266,7 +10274,7 @@ function setupCommands(argv) {
|
|
|
10266
10274
|
}
|
|
10267
10275
|
function showGreeting() {
|
|
10268
10276
|
let { npm_execpath, npm_lifecycle_event, NODE_RUN_SCRIPT_NAME } = process.env, isBun = npm_execpath?.includes('.bun');
|
|
10269
|
-
src_logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v2.2.
|
|
10277
|
+
src_logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v2.2.2\n`);
|
|
10270
10278
|
}
|
|
10271
10279
|
function setupLogLevel(argv) {
|
|
10272
10280
|
if (argv.length <= 3) return;
|
|
@@ -10288,5 +10296,5 @@ function runCLI({ argv = process.argv } = {}) {
|
|
|
10288
10296
|
src_logger.error('Failed to start Rsbuild CLI.'), src_logger.error(err), process.exit(1);
|
|
10289
10297
|
}
|
|
10290
10298
|
}
|
|
10291
|
-
let src_version = "2.2.
|
|
10299
|
+
let src_version = "2.2.2";
|
|
10292
10300
|
export { PLUGIN_CSS_NAME, PLUGIN_SWC_NAME, core_rspack as rspack, createRsbuild, defaultAllowedOrigins, defineConfig, ensureAssetPrefix, loadConfig_loadConfig as loadConfig, loadEnv, logger_createLogger as createLogger, mergeRsbuildConfig, mrmime_lookup, runCLI, src_logger as logger, src_version as version };
|
package/dist/cors.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*! LICENSE: cors.js.LICENSE.txt */
|
|
2
2
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
3
3
|
__webpack_require__.add({
|
|
4
|
-
"
|
|
4
|
+
"../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/cors/2.8.6/abeeebb4dd5e2293f01aa9f4c01ff28ab19103cfa7a845442d515e16cf051f35/node_modules/cors/lib/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
5
5
|
!function() {
|
|
6
6
|
'use strict';
|
|
7
|
-
var assign = __webpack_require__("
|
|
7
|
+
var assign = __webpack_require__("../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/object-assign/4.1.1/7484bb3c3a4836e4c31b8d5f504f6887c20d893fdbd24ec4749135d8d99aad17/node_modules/object-assign/index.js"), vary = __webpack_require__("../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/vary/1.1.2/2d4a2b8719eb32d3ae1a3d3df6c7712e3dd7ac104a75e94ae2fc6072cb890be6/node_modules/vary/index.js"), defaults = {
|
|
8
8
|
origin: '*',
|
|
9
9
|
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
|
|
10
10
|
preflightContinue: !1,
|
|
@@ -115,7 +115,7 @@ __webpack_require__.add({
|
|
|
115
115
|
};
|
|
116
116
|
}();
|
|
117
117
|
},
|
|
118
|
-
"
|
|
118
|
+
"../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/object-assign/4.1.1/7484bb3c3a4836e4c31b8d5f504f6887c20d893fdbd24ec4749135d8d99aad17/node_modules/object-assign/index.js" (module) {
|
|
119
119
|
var getOwnPropertySymbols = Object.getOwnPropertySymbols, hasOwnProperty = Object.prototype.hasOwnProperty, propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
120
120
|
function toObject(val) {
|
|
121
121
|
if (null == val) throw TypeError('Object.assign cannot be called with null or undefined');
|
|
@@ -150,7 +150,7 @@ __webpack_require__.add({
|
|
|
150
150
|
return to;
|
|
151
151
|
} : Object.assign;
|
|
152
152
|
},
|
|
153
|
-
"
|
|
153
|
+
"../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/vary/1.1.2/2d4a2b8719eb32d3ae1a3d3df6c7712e3dd7ac104a75e94ae2fc6072cb890be6/node_modules/vary/index.js" (module) {
|
|
154
154
|
module.exports = vary, module.exports.append = append;
|
|
155
155
|
var FIELD_NAME_REGEXP = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
156
156
|
function append(header, field) {
|
|
@@ -185,4 +185,4 @@ __webpack_require__.add({
|
|
|
185
185
|
(val = append(Array.isArray(val) ? val.join(', ') : String(val), field)) && res.setHeader('Vary', val);
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
-
}), __webpack_require__("
|
|
188
|
+
}), __webpack_require__("../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/cors/2.8.6/abeeebb4dd5e2293f01aa9f4c01ff28ab19103cfa7a845442d515e16cf051f35/node_modules/cors/lib/index.js");
|