@rsbuild/core 2.0.0-beta.10 → 2.0.0-beta.11
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/html-rspack-plugin/index.js +28 -73
- package/compiled/html-rspack-plugin/package.json +1 -1
- package/compiled/postcss-loader/index.js +6 -6
- package/compiled/rslog/index.d.ts +1 -1
- package/compiled/rslog/package.json +1 -1
- package/dist/{958.js → 552.js} +174 -42
- package/dist/chokidar.js +34 -33
- package/dist/connect-next.js +4 -8
- package/dist/cors.js +1 -1
- package/dist/{src.js → debug.js} +3 -10
- package/dist/http-proxy-middleware.js +19 -57
- package/dist/index.js +1 -1
- package/dist/launch-editor-middleware.js +8 -27
- package/dist/manifest-plugin.js +9 -16
- package/dist/memfs.js +8 -31
- package/dist/mrmime.js +1 -2
- package/dist/range-parser.js +1 -1
- package/dist/sirv.js +10 -10
- package/dist/tinyglobby.js +1 -1
- package/dist/ws.js +8 -44
- package/dist-types/types/config.d.ts +1 -1
- package/package.json +9 -10
- package/types.d.ts +1 -1
- /package/dist/{rslib-runtime.js → 1~rslib-runtime.js} +0 -0
- /package/dist/{958.js.LICENSE.txt → 552.js.LICENSE.txt} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
365: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const { HtmlWebpackChildCompiler } = __nccwpck_require__(
|
|
5
|
+
const { HtmlWebpackChildCompiler } = __nccwpck_require__(478);
|
|
6
6
|
const compilerMap = new WeakMap();
|
|
7
7
|
class CachedChildCompilation {
|
|
8
8
|
constructor(compiler) {
|
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
}
|
|
312
312
|
module.exports = { CachedChildCompilation };
|
|
313
313
|
},
|
|
314
|
-
|
|
314
|
+
478: (module) => {
|
|
315
315
|
"use strict";
|
|
316
316
|
class HtmlWebpackChildCompiler {
|
|
317
317
|
constructor(templates) {
|
|
@@ -480,7 +480,7 @@
|
|
|
480
480
|
}
|
|
481
481
|
module.exports = { HtmlWebpackChildCompiler };
|
|
482
482
|
},
|
|
483
|
-
|
|
483
|
+
262: (module) => {
|
|
484
484
|
"use strict";
|
|
485
485
|
module.exports = {};
|
|
486
486
|
module.exports.none = (chunks) => chunks;
|
|
@@ -499,7 +499,7 @@
|
|
|
499
499
|
};
|
|
500
500
|
module.exports.auto = module.exports.none;
|
|
501
501
|
},
|
|
502
|
-
|
|
502
|
+
329: (module) => {
|
|
503
503
|
"use strict";
|
|
504
504
|
module.exports = function (err) {
|
|
505
505
|
return {
|
|
@@ -523,7 +523,7 @@
|
|
|
523
523
|
};
|
|
524
524
|
};
|
|
525
525
|
},
|
|
526
|
-
|
|
526
|
+
336: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
527
527
|
"use strict";
|
|
528
528
|
const { AsyncSeriesWaterfallHook } = __nccwpck_require__(159);
|
|
529
529
|
const htmlWebpackPluginHooksMap = new WeakMap();
|
|
@@ -549,7 +549,7 @@
|
|
|
549
549
|
}
|
|
550
550
|
module.exports = { getHtmlRspackPluginHooks };
|
|
551
551
|
},
|
|
552
|
-
|
|
552
|
+
173: (module) => {
|
|
553
553
|
const voidTags = [
|
|
554
554
|
"area",
|
|
555
555
|
"base",
|
|
@@ -617,19 +617,19 @@
|
|
|
617
617
|
htmlTagObjectToString,
|
|
618
618
|
};
|
|
619
619
|
},
|
|
620
|
-
|
|
620
|
+
216: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
621
621
|
"use strict";
|
|
622
622
|
const promisify = __nccwpck_require__(23).promisify;
|
|
623
623
|
const vm = __nccwpck_require__(154);
|
|
624
624
|
const fs = __nccwpck_require__(896);
|
|
625
625
|
const path = __nccwpck_require__(928);
|
|
626
|
-
const { CachedChildCompilation } = __nccwpck_require__(
|
|
626
|
+
const { CachedChildCompilation } = __nccwpck_require__(365);
|
|
627
627
|
const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } =
|
|
628
|
-
__nccwpck_require__(
|
|
629
|
-
const prettyError = __nccwpck_require__(
|
|
630
|
-
const chunkSorter = __nccwpck_require__(
|
|
628
|
+
__nccwpck_require__(173);
|
|
629
|
+
const prettyError = __nccwpck_require__(329);
|
|
630
|
+
const chunkSorter = __nccwpck_require__(262);
|
|
631
631
|
const getHtmlRspackPluginHooks =
|
|
632
|
-
__nccwpck_require__(
|
|
632
|
+
__nccwpck_require__(336).getHtmlRspackPluginHooks;
|
|
633
633
|
const WITH_PLACEHOLDER = "function __with_placeholder__";
|
|
634
634
|
class HtmlRspackPlugin {
|
|
635
635
|
constructor(userOptions = {}) {
|
|
@@ -907,65 +907,20 @@
|
|
|
907
907
|
const templateWithoutLoaders = templateFilename
|
|
908
908
|
.replace(/^.+!/, "")
|
|
909
909
|
.replace(/\?.+$/, "");
|
|
910
|
-
const
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
CountQueuingStrategy: global.CountQueuingStrategy,
|
|
925
|
-
Crypto: global.Crypto,
|
|
926
|
-
CryptoKey: global.CryptoKey,
|
|
927
|
-
CustomEvent: global.CustomEvent,
|
|
928
|
-
DecompressionStream: global.DecompressionStream,
|
|
929
|
-
Event: global.Event,
|
|
930
|
-
EventTarget: global.EventTarget,
|
|
931
|
-
File: global.File,
|
|
932
|
-
FormData: global.FormData,
|
|
933
|
-
Headers: global.Headers,
|
|
934
|
-
MessageChannel: global.MessageChannel,
|
|
935
|
-
MessageEvent: global.MessageEvent,
|
|
936
|
-
MessagePort: global.MessagePort,
|
|
937
|
-
PerformanceEntry: global.PerformanceEntry,
|
|
938
|
-
PerformanceMark: global.PerformanceMark,
|
|
939
|
-
PerformanceMeasure: global.PerformanceMeasure,
|
|
940
|
-
PerformanceObserver: global.PerformanceObserver,
|
|
941
|
-
PerformanceObserverEntryList: global.PerformanceObserverEntryList,
|
|
942
|
-
PerformanceResourceTiming: global.PerformanceResourceTiming,
|
|
943
|
-
ReadableByteStreamController: global.ReadableByteStreamController,
|
|
944
|
-
ReadableStream: global.ReadableStream,
|
|
945
|
-
ReadableStreamBYOBReader: global.ReadableStreamBYOBReader,
|
|
946
|
-
ReadableStreamBYOBRequest: global.ReadableStreamBYOBRequest,
|
|
947
|
-
ReadableStreamDefaultController:
|
|
948
|
-
global.ReadableStreamDefaultController,
|
|
949
|
-
ReadableStreamDefaultReader: global.ReadableStreamDefaultReader,
|
|
950
|
-
Response: global.Response,
|
|
951
|
-
Request: global.Request,
|
|
952
|
-
SubtleCrypto: global.SubtleCrypto,
|
|
953
|
-
DOMException: global.DOMException,
|
|
954
|
-
TextDecoder: global.TextDecoder,
|
|
955
|
-
TextDecoderStream: global.TextDecoderStream,
|
|
956
|
-
TextEncoder: global.TextEncoder,
|
|
957
|
-
TextEncoderStream: global.TextEncoderStream,
|
|
958
|
-
TransformStream: global.TransformStream,
|
|
959
|
-
TransformStreamDefaultController:
|
|
960
|
-
global.TransformStreamDefaultController,
|
|
961
|
-
URL: global.URL,
|
|
962
|
-
URLSearchParams: global.URLSearchParams,
|
|
963
|
-
WebAssembly: global.WebAssembly,
|
|
964
|
-
WritableStream: global.WritableStream,
|
|
965
|
-
WritableStreamDefaultController:
|
|
966
|
-
global.WritableStreamDefaultController,
|
|
967
|
-
WritableStreamDefaultWriter: global.WritableStreamDefaultWriter,
|
|
968
|
-
});
|
|
910
|
+
const globalClone = Object.create(
|
|
911
|
+
Object.getPrototypeOf(global),
|
|
912
|
+
Object.getOwnPropertyDescriptors(global),
|
|
913
|
+
);
|
|
914
|
+
delete globalClone.eval;
|
|
915
|
+
const vmContext = vm.createContext(
|
|
916
|
+
Object.assign(globalClone, {
|
|
917
|
+
HTML_WEBPACK_PLUGIN: true,
|
|
918
|
+
require,
|
|
919
|
+
htmlWebpackPluginPublicPath: publicPath,
|
|
920
|
+
__filename: templateWithoutLoaders,
|
|
921
|
+
__dirname: path.dirname(templateWithoutLoaders),
|
|
922
|
+
}),
|
|
923
|
+
);
|
|
969
924
|
const vmScript = new vm.Script(source, {
|
|
970
925
|
filename: templateWithoutLoaders,
|
|
971
926
|
});
|
|
@@ -2443,6 +2398,6 @@
|
|
|
2443
2398
|
}
|
|
2444
2399
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
2445
2400
|
__nccwpck_require__.ab = __dirname + "/";
|
|
2446
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
2401
|
+
var __webpack_exports__ = __nccwpck_require__(216);
|
|
2447
2402
|
module.exports = __webpack_exports__;
|
|
2448
2403
|
})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"html-rspack-plugin","author":"Jan Nicklas <j.nicklas@me.com> (https://github.com/jantimon)","version":"6.1.
|
|
1
|
+
{"name":"html-rspack-plugin","author":"Jan Nicklas <j.nicklas@me.com> (https://github.com/jantimon)","version":"6.1.8","funding":{"type":"opencollective","url":"https://opencollective.com/html-webpack-plugin"},"license":"MIT","types":"index.d.ts","type":"commonjs"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
5
|
-
module.exports = __nccwpck_require__(
|
|
4
|
+
381: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
module.exports = __nccwpck_require__(551)["default"];
|
|
6
6
|
},
|
|
7
|
-
|
|
7
|
+
551: (__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 _nodePath = _interopRequireDefault(__nccwpck_require__(760));
|
|
12
|
-
var _utils = __nccwpck_require__(
|
|
12
|
+
var _utils = __nccwpck_require__(754);
|
|
13
13
|
function _interopRequireDefault(e) {
|
|
14
14
|
return e && e.__esModule ? e : { default: e };
|
|
15
15
|
}
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
callback(null, result.css, map, { ast });
|
|
180
180
|
}
|
|
181
181
|
},
|
|
182
|
-
|
|
182
|
+
754: (module, exports, __nccwpck_require__) => {
|
|
183
183
|
module = __nccwpck_require__.nmd(module);
|
|
184
184
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
185
185
|
exports.exec = exec;
|
|
@@ -716,6 +716,6 @@
|
|
|
716
716
|
})();
|
|
717
717
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
718
718
|
__nccwpck_require__.ab = __dirname + "/";
|
|
719
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
719
|
+
var __webpack_exports__ = __nccwpck_require__(381);
|
|
720
720
|
module.exports = __webpack_exports__;
|
|
721
721
|
})();
|
|
@@ -64,7 +64,7 @@ interface LogType {
|
|
|
64
64
|
level: LogLevel;
|
|
65
65
|
color?: ColorFn;
|
|
66
66
|
}
|
|
67
|
-
type LogFunction = (message?: LogMessage, ...args:
|
|
67
|
+
type LogFunction = (message?: LogMessage, ...args: unknown[]) => void;
|
|
68
68
|
interface Options {
|
|
69
69
|
/**
|
|
70
70
|
* Controls which log levels are emitted.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"rslog","version":"2.1.
|
|
1
|
+
{"name":"rslog","version":"2.1.1","license":"MIT","types":"index.d.ts","type":"module"}
|
package/dist/{958.js → 552.js}
RENAMED
|
@@ -1,26 +1,18 @@
|
|
|
1
|
-
/*! LICENSE:
|
|
1
|
+
/*! LICENSE: 552.js.LICENSE.txt */
|
|
2
2
|
let flagForceColor, runtimeProcessArgs, runtimeInfo, swcHelpersPath, pluginHelper_htmlPlugin, cssExtractPlugin;
|
|
3
|
-
import { fileURLToPath as __rspack_fileURLToPath, URL as external_node_url_URL, fileURLToPath, pathToFileURL } from "node:url";
|
|
4
|
-
import { createRequire as __rspack_createRequire, builtinModules, createRequire } from "node:module";
|
|
5
|
-
let __rspack_createRequire_require = __rspack_createRequire(import.meta.url);
|
|
6
|
-
import * as __rspack_external_async_hooks from "async_hooks";
|
|
7
|
-
import * as __rspack_external_fs from "fs";
|
|
8
|
-
import * as __rspack_external_node_module_ab9f2194 from "node:module";
|
|
9
|
-
import node_path, * as __rspack_external_node_path_c5b9b54f from "node:path";
|
|
10
|
-
import * as __rspack_external_node_url_e96de089 from "node:url";
|
|
11
|
-
import * as __rspack_external_os from "os";
|
|
12
|
-
import * as __rspack_external_path from "path";
|
|
13
|
-
import * as __rspack_external_url from "url";
|
|
14
|
-
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
15
3
|
import { rspack as core_rspack } from "@rspack/core";
|
|
16
4
|
import node_util, { stripVTControlCharacters } from "node:util";
|
|
17
5
|
import node_process from "node:process";
|
|
18
6
|
import node_os, { constants as external_node_os_constants } from "node:os";
|
|
19
7
|
import node_tty from "node:tty";
|
|
20
|
-
import { dirname as external_node_path_dirname, isAbsolute as external_node_path_isAbsolute, join, posix, relative, sep, win32 } from "node:path";
|
|
8
|
+
import node_path, { dirname as external_node_path_dirname, isAbsolute as external_node_path_isAbsolute, join, posix, relative, sep, win32 } from "node:path";
|
|
9
|
+
import { builtinModules, createRequire, createRequire as __rspack_createRequire } from "node:module";
|
|
21
10
|
import node_fs, { existsSync } from "node:fs";
|
|
11
|
+
import { URL as external_node_url_URL, fileURLToPath, pathToFileURL, fileURLToPath as __rspack_fileURLToPath } from "node:url";
|
|
22
12
|
import { isPromise, isRegExp } from "node:util/types";
|
|
23
13
|
import node_zlib from "node:zlib";
|
|
14
|
+
import { __webpack_require__ } from "./1~rslib-runtime.js";
|
|
15
|
+
let __rspack_createRequire_require = __rspack_createRequire(import.meta.url);
|
|
24
16
|
__webpack_require__.add({
|
|
25
17
|
"../../node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js" (module) {
|
|
26
18
|
var isMergeableObject = function isMergeableObject(value) {
|
|
@@ -157,7 +149,7 @@ __webpack_require__.add({
|
|
|
157
149
|
};
|
|
158
150
|
},
|
|
159
151
|
"../../node_modules/.pnpm/lilconfig@3.1.3/node_modules/lilconfig/src/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
160
|
-
let path = __webpack_require__("path?
|
|
152
|
+
let path = __webpack_require__("path?37f5"), fs = __webpack_require__("fs?cdbd"), os = __webpack_require__("os"), url = __webpack_require__("url?5f07"), fsReadFileAsync = fs.promises.readFile;
|
|
161
153
|
function getDefaultSearchPlaces(name, sync) {
|
|
162
154
|
return [
|
|
163
155
|
'package.json',
|
|
@@ -189,7 +181,9 @@ __webpack_require__.add({
|
|
|
189
181
|
'.json': __rspack_createRequire_require,
|
|
190
182
|
'.cjs': __rspack_createRequire_require,
|
|
191
183
|
noExt: jsonLoader
|
|
192
|
-
})
|
|
184
|
+
});
|
|
185
|
+
module.exports.defaultLoadersSync = defaultLoadersSync;
|
|
186
|
+
let dynamicImport = async (id)=>{
|
|
193
187
|
try {
|
|
194
188
|
let fileUrl = url.pathToFileURL(id).href;
|
|
195
189
|
return (await import(fileUrl)).default;
|
|
@@ -240,8 +234,10 @@ __webpack_require__.add({
|
|
|
240
234
|
if (!loader) throw Error(`No loader specified for extension "${ext}"`);
|
|
241
235
|
if ('function' != typeof loader) throw Error('loader is not a function');
|
|
242
236
|
}
|
|
237
|
+
module.exports.defaultLoaders = defaultLoaders;
|
|
238
|
+
let makeEmplace = (enableCache)=>(c, filepath, res)=>(enableCache && c.set(filepath, res), res);
|
|
243
239
|
module.exports.lilconfig = function lilconfig(name, options) {
|
|
244
|
-
let { ignoreEmptySearchPlaces, loaders, packageProp, searchPlaces, stopDir, transform, cache } = getOptions(name, options ?? {}, !1), searchCache = new Map(), loadCache = new Map(), emplace = (
|
|
240
|
+
let { ignoreEmptySearchPlaces, loaders, packageProp, searchPlaces, stopDir, transform, cache } = getOptions(name, options ?? {}, !1), searchCache = new Map(), loadCache = new Map(), emplace = makeEmplace(cache);
|
|
245
241
|
return {
|
|
246
242
|
async search (searchFrom = process.cwd()) {
|
|
247
243
|
let result = {
|
|
@@ -324,6 +320,87 @@ __webpack_require__.add({
|
|
|
324
320
|
cache && (loadCache.clear(), searchCache.clear());
|
|
325
321
|
}
|
|
326
322
|
};
|
|
323
|
+
}, module.exports.lilconfigSync = function lilconfigSync(name, options) {
|
|
324
|
+
let { ignoreEmptySearchPlaces, loaders, packageProp, searchPlaces, stopDir, transform, cache } = getOptions(name, options ?? {}, !0), searchCache = new Map(), loadCache = new Map(), emplace = makeEmplace(cache);
|
|
325
|
+
return {
|
|
326
|
+
search (searchFrom = process.cwd()) {
|
|
327
|
+
let result = {
|
|
328
|
+
config: null,
|
|
329
|
+
filepath: ''
|
|
330
|
+
}, visited = new Set(), dir = searchFrom;
|
|
331
|
+
dirLoop: for(;;){
|
|
332
|
+
if (cache) {
|
|
333
|
+
let r = searchCache.get(dir);
|
|
334
|
+
if (void 0 !== r) {
|
|
335
|
+
for (let p of visited)searchCache.set(p, r);
|
|
336
|
+
return r;
|
|
337
|
+
}
|
|
338
|
+
visited.add(dir);
|
|
339
|
+
}
|
|
340
|
+
for (let searchPlace of searchPlaces){
|
|
341
|
+
let filepath = path.join(dir, searchPlace);
|
|
342
|
+
try {
|
|
343
|
+
fs.accessSync(filepath);
|
|
344
|
+
} catch {
|
|
345
|
+
continue;
|
|
346
|
+
}
|
|
347
|
+
let loaderKey = path.extname(searchPlace) || 'noExt', loader = loaders[loaderKey], content = String(fs.readFileSync(filepath));
|
|
348
|
+
if ('package.json' === searchPlace) {
|
|
349
|
+
let maybeConfig = getPackageProp(packageProp, loader(filepath, content));
|
|
350
|
+
if (null != maybeConfig) {
|
|
351
|
+
result.config = maybeConfig, result.filepath = filepath;
|
|
352
|
+
break dirLoop;
|
|
353
|
+
}
|
|
354
|
+
continue;
|
|
355
|
+
}
|
|
356
|
+
let isEmpty = '' === content.trim();
|
|
357
|
+
if (!isEmpty || !ignoreEmptySearchPlaces) {
|
|
358
|
+
isEmpty ? (result.isEmpty = !0, result.config = void 0) : (validateLoader(loader, loaderKey), result.config = loader(filepath, content)), result.filepath = filepath;
|
|
359
|
+
break dirLoop;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
if (dir === stopDir || dir === parentDir(dir)) break;
|
|
363
|
+
dir = parentDir(dir);
|
|
364
|
+
}
|
|
365
|
+
let transformed = '' === result.filepath && null === result.config ? transform(null) : transform(result);
|
|
366
|
+
if (cache) for (let p of visited)searchCache.set(p, transformed);
|
|
367
|
+
return transformed;
|
|
368
|
+
},
|
|
369
|
+
load (filepath) {
|
|
370
|
+
validateFilePath(filepath);
|
|
371
|
+
let absPath = path.resolve(process.cwd(), filepath);
|
|
372
|
+
if (cache && loadCache.has(absPath)) return loadCache.get(absPath);
|
|
373
|
+
let { base, ext } = path.parse(absPath), loaderKey = ext || 'noExt', loader = loaders[loaderKey];
|
|
374
|
+
validateLoader(loader, loaderKey);
|
|
375
|
+
let content = String(fs.readFileSync(absPath));
|
|
376
|
+
if ('package.json' === base) return transform({
|
|
377
|
+
config: getPackageProp(packageProp, loader(absPath, content)),
|
|
378
|
+
filepath: absPath
|
|
379
|
+
});
|
|
380
|
+
let result = {
|
|
381
|
+
config: null,
|
|
382
|
+
filepath: absPath
|
|
383
|
+
}, isEmpty = '' === content.trim();
|
|
384
|
+
return isEmpty && ignoreEmptySearchPlaces ? emplace(loadCache, absPath, transform({
|
|
385
|
+
filepath: absPath,
|
|
386
|
+
config: void 0,
|
|
387
|
+
isEmpty: !0
|
|
388
|
+
})) : (result.config = isEmpty ? void 0 : loader(absPath, content), emplace(loadCache, absPath, transform(isEmpty ? {
|
|
389
|
+
...result,
|
|
390
|
+
isEmpty,
|
|
391
|
+
config: void 0
|
|
392
|
+
} : result)));
|
|
393
|
+
},
|
|
394
|
+
clearLoadCache () {
|
|
395
|
+
cache && loadCache.clear();
|
|
396
|
+
},
|
|
397
|
+
clearSearchCache () {
|
|
398
|
+
cache && searchCache.clear();
|
|
399
|
+
},
|
|
400
|
+
clearCaches () {
|
|
401
|
+
cache && (loadCache.clear(), searchCache.clear());
|
|
402
|
+
}
|
|
403
|
+
};
|
|
327
404
|
};
|
|
328
405
|
},
|
|
329
406
|
"../../node_modules/.pnpm/on-finished@2.4.1/node_modules/on-finished/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
@@ -393,7 +470,7 @@ __webpack_require__.add({
|
|
|
393
470
|
}
|
|
394
471
|
},
|
|
395
472
|
"../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.8_yaml@2.8.2/node_modules/postcss-load-config/src/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
396
|
-
let yaml, { resolve } = __webpack_require__("node:path?
|
|
473
|
+
let yaml, { resolve } = __webpack_require__("node:path?815c"), config = __webpack_require__("../../node_modules/.pnpm/lilconfig@3.1.3/node_modules/lilconfig/src/index.js"), loadOptions = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.8_yaml@2.8.2/node_modules/postcss-load-config/src/options.js"), loadPlugins = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.8_yaml@2.8.2/node_modules/postcss-load-config/src/plugins.js"), req = __webpack_require__("../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.8_yaml@2.8.2/node_modules/postcss-load-config/src/req.js");
|
|
397
474
|
async function processResult(ctx, result) {
|
|
398
475
|
let obj, file = result.filepath || '', projectConfig = ((obj = result.config) && obj.__esModule ? obj : {
|
|
399
476
|
default: obj
|
|
@@ -507,7 +584,7 @@ __webpack_require__.add({
|
|
|
507
584
|
"../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.8_yaml@2.8.2/node_modules/postcss-load-config/src/req.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
508
585
|
let tsx, jiti;
|
|
509
586
|
var __filename = __rspack_fileURLToPath(import.meta.url);
|
|
510
|
-
let { createRequire } = __webpack_require__("node:module?
|
|
587
|
+
let { createRequire } = __webpack_require__("node:module?f56b"), { pathToFileURL } = __webpack_require__("node:url?5295"), TS_EXT_RE = /\.[mc]?ts$/, importError = [];
|
|
511
588
|
module.exports = async function req(name, rootFile = __filename) {
|
|
512
589
|
let url = createRequire(rootFile).resolve(name);
|
|
513
590
|
try {
|
|
@@ -535,32 +612,86 @@ __webpack_require__.add({
|
|
|
535
612
|
throw Error(`'tsx' or 'jiti' is required for the TypeScript configuration files. Make sure it is installed\nError: ${importError.map((error)=>error.message).join('\n')}`);
|
|
536
613
|
};
|
|
537
614
|
},
|
|
615
|
+
assert (module) {
|
|
616
|
+
module.exports = __rspack_createRequire_require("assert");
|
|
617
|
+
},
|
|
538
618
|
async_hooks (module) {
|
|
539
|
-
module.exports =
|
|
619
|
+
module.exports = __rspack_createRequire_require("async_hooks");
|
|
540
620
|
},
|
|
541
|
-
|
|
542
|
-
module.exports =
|
|
621
|
+
buffer (module) {
|
|
622
|
+
module.exports = __rspack_createRequire_require("buffer");
|
|
543
623
|
},
|
|
544
|
-
|
|
545
|
-
module.exports =
|
|
624
|
+
child_process (module) {
|
|
625
|
+
module.exports = __rspack_createRequire_require("child_process");
|
|
546
626
|
},
|
|
547
|
-
|
|
548
|
-
module.exports =
|
|
627
|
+
crypto (module) {
|
|
628
|
+
module.exports = __rspack_createRequire_require("crypto");
|
|
549
629
|
},
|
|
550
|
-
|
|
551
|
-
module.exports =
|
|
630
|
+
events (module) {
|
|
631
|
+
module.exports = __rspack_createRequire_require("events");
|
|
552
632
|
},
|
|
553
|
-
"
|
|
554
|
-
module.exports =
|
|
633
|
+
"fs?cdbd" (module) {
|
|
634
|
+
module.exports = __rspack_createRequire_require("fs");
|
|
555
635
|
},
|
|
556
|
-
|
|
557
|
-
module.exports =
|
|
636
|
+
http (module) {
|
|
637
|
+
module.exports = __rspack_createRequire_require("http");
|
|
558
638
|
},
|
|
559
|
-
|
|
560
|
-
module.exports =
|
|
639
|
+
https (module) {
|
|
640
|
+
module.exports = __rspack_createRequire_require("https");
|
|
561
641
|
},
|
|
562
|
-
|
|
642
|
+
net (module) {
|
|
643
|
+
module.exports = __rspack_createRequire_require("net");
|
|
644
|
+
},
|
|
645
|
+
"node:buffer?4a79" (module) {
|
|
646
|
+
module.exports = __rspack_createRequire_require("node:buffer");
|
|
647
|
+
},
|
|
648
|
+
"node:events?5dda" (module) {
|
|
563
649
|
module.exports = __rspack_createRequire_require("node:events");
|
|
650
|
+
},
|
|
651
|
+
"node:fs?31c0" (module) {
|
|
652
|
+
module.exports = __rspack_createRequire_require("node:fs");
|
|
653
|
+
},
|
|
654
|
+
"node:module?f56b" (module) {
|
|
655
|
+
module.exports = __rspack_createRequire_require("node:module");
|
|
656
|
+
},
|
|
657
|
+
"node:path?815c" (module) {
|
|
658
|
+
module.exports = __rspack_createRequire_require("node:path");
|
|
659
|
+
},
|
|
660
|
+
"node:stream?be04" (module) {
|
|
661
|
+
module.exports = __rspack_createRequire_require("node:stream");
|
|
662
|
+
},
|
|
663
|
+
"node:url?5295" (module) {
|
|
664
|
+
module.exports = __rspack_createRequire_require("node:url");
|
|
665
|
+
},
|
|
666
|
+
os (module) {
|
|
667
|
+
module.exports = __rspack_createRequire_require("os");
|
|
668
|
+
},
|
|
669
|
+
"path?37f5" (module) {
|
|
670
|
+
module.exports = __rspack_createRequire_require("path");
|
|
671
|
+
},
|
|
672
|
+
process (module) {
|
|
673
|
+
module.exports = __rspack_createRequire_require("process");
|
|
674
|
+
},
|
|
675
|
+
querystring (module) {
|
|
676
|
+
module.exports = __rspack_createRequire_require("querystring");
|
|
677
|
+
},
|
|
678
|
+
stream (module) {
|
|
679
|
+
module.exports = __rspack_createRequire_require("stream");
|
|
680
|
+
},
|
|
681
|
+
tls (module) {
|
|
682
|
+
module.exports = __rspack_createRequire_require("tls");
|
|
683
|
+
},
|
|
684
|
+
tty (module) {
|
|
685
|
+
module.exports = __rspack_createRequire_require("tty");
|
|
686
|
+
},
|
|
687
|
+
"url?5f07" (module) {
|
|
688
|
+
module.exports = __rspack_createRequire_require("url");
|
|
689
|
+
},
|
|
690
|
+
util (module) {
|
|
691
|
+
module.exports = __rspack_createRequire_require("util");
|
|
692
|
+
},
|
|
693
|
+
zlib (module) {
|
|
694
|
+
module.exports = __rspack_createRequire_require("zlib");
|
|
564
695
|
}
|
|
565
696
|
}), function checkNodeVersion() {
|
|
566
697
|
let { versions } = process;
|
|
@@ -3471,7 +3602,7 @@ function createPublicContext(context) {
|
|
|
3471
3602
|
async function createContext(options, userConfig, logger) {
|
|
3472
3603
|
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;
|
|
3473
3604
|
return {
|
|
3474
|
-
version: "2.0.0-beta.
|
|
3605
|
+
version: "2.0.0-beta.11",
|
|
3475
3606
|
rootPath,
|
|
3476
3607
|
distPath: '',
|
|
3477
3608
|
cachePath,
|
|
@@ -5658,7 +5789,8 @@ function applySwcDecoratorConfig(swcConfig, config) {
|
|
|
5658
5789
|
swcConfig.jsc.transform.legacyDecorator = !0, swcConfig.jsc.transform.decoratorMetadata = !0, swcConfig.jsc.transform.useDefineForClassFields = !1;
|
|
5659
5790
|
break;
|
|
5660
5791
|
case '2022-03':
|
|
5661
|
-
|
|
5792
|
+
case '2023-11':
|
|
5793
|
+
swcConfig.jsc.transform.legacyDecorator = !1, swcConfig.jsc.transform.decoratorVersion = version;
|
|
5662
5794
|
break;
|
|
5663
5795
|
default:
|
|
5664
5796
|
throw Error(`${color.dim('[rsbuild:swc]')} Unknown decorators version: ${color.yellow(version)}`);
|
|
@@ -7659,7 +7791,7 @@ function applyDefaultPlugins(pluginManager, context) {
|
|
|
7659
7791
|
let { sourceMap } = config.output, isProd = 'production' === config.mode;
|
|
7660
7792
|
return !1 !== sourceMap && (!0 === sourceMap ? isProd ? 'source-map' : 'cheap-module-source-map' : void 0 === sourceMap.js ? !isProd && 'cheap-module-source-map' : sourceMap.js);
|
|
7661
7793
|
})(config);
|
|
7662
|
-
chain.devtool(devtool), isDev && 'web' === target ? chain.output.devtoolModuleFilenameTemplate((info)=>toPosixPath(info.absoluteResourcePath)) : chain.output.devtoolModuleFilenameTemplate('[relative-resource-path]'), !devtool && ((config)=>{
|
|
7794
|
+
chain.devtool(devtool), isDev && 'web' === target ? (chain.output.devtoolModuleFilenameTemplate((info)=>toPosixPath(info.absoluteResourcePath)), chain.output.devtoolFallbackModuleFilenameTemplate((info)=>`${toPosixPath(info.absoluteResourcePath)}?${info.hash}`)) : (chain.output.devtoolModuleFilenameTemplate('[relative-resource-path]'), chain.output.devtoolFallbackModuleFilenameTemplate('[relative-resource-path]?[hash]')), !devtool && ((config)=>{
|
|
7663
7795
|
let { sourceMap } = config.output;
|
|
7664
7796
|
return 'object' == typeof sourceMap && sourceMap.css;
|
|
7665
7797
|
})(config) && chain.plugin('source-map-css').use(rspack.SourceMapDevToolPlugin, [
|
|
@@ -8671,7 +8803,7 @@ try {
|
|
|
8671
8803
|
api.modifyBundlerChain(async (chain, { CHAIN_ID, environment, isDev })=>{
|
|
8672
8804
|
let { output: { manifest }, dev: { writeToDisk } } = environment.config;
|
|
8673
8805
|
if (!1 === manifest) return;
|
|
8674
|
-
let manifestOptions = normalizeManifestObjectConfig(manifest), { RspackManifestPlugin } = await import("./manifest-plugin.js").then(__webpack_require__.bind(__webpack_require__, "../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.0-beta.
|
|
8806
|
+
let manifestOptions = normalizeManifestObjectConfig(manifest), { RspackManifestPlugin } = await import("./manifest-plugin.js").then(__webpack_require__.bind(__webpack_require__, "../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.0-beta.9_@module-federation+runtime-tools@2.3.0_@swc+helpers@0.5.20_/node_modules/rspack-manifest-plugin/dist/index.js")), { htmlPaths } = environment, filter = manifestOptions.filter ?? ((file)=>!file.name.endsWith('.LICENSE.txt'));
|
|
8675
8807
|
manifestFilenames.set(environment.name, manifestOptions.filename);
|
|
8676
8808
|
let pluginOptions = {
|
|
8677
8809
|
fileName: manifestOptions.filename,
|
|
@@ -9185,7 +9317,7 @@ let applyServerOptions = (command)=>{
|
|
|
9185
9317
|
};
|
|
9186
9318
|
function setupCommands() {
|
|
9187
9319
|
let cli = ((name = "")=>new CAC(name))('rsbuild');
|
|
9188
|
-
cli.version("2.0.0-beta.
|
|
9320
|
+
cli.version("2.0.0-beta.11"), 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)', {
|
|
9189
9321
|
default: 'auto'
|
|
9190
9322
|
}).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', {
|
|
9191
9323
|
type: [
|
|
@@ -9262,7 +9394,7 @@ function initNodeEnv() {
|
|
|
9262
9394
|
}
|
|
9263
9395
|
function showGreeting() {
|
|
9264
9396
|
let { npm_execpath, npm_lifecycle_event, NODE_RUN_SCRIPT_NAME } = process.env, isBun = npm_execpath?.includes('.bun');
|
|
9265
|
-
src_logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v2.0.0-beta.
|
|
9397
|
+
src_logger.greet(`${'npx' === npm_lifecycle_event || isBun || NODE_RUN_SCRIPT_NAME ? '\n' : ''}Rsbuild v2.0.0-beta.11\n`);
|
|
9266
9398
|
}
|
|
9267
9399
|
function setupLogLevel() {
|
|
9268
9400
|
let logLevelIndex = process.argv.findIndex((item)=>'--log-level' === item || '--logLevel' === item);
|
|
@@ -9283,5 +9415,5 @@ function runCLI() {
|
|
|
9283
9415
|
src_logger.error('Failed to start Rsbuild CLI.'), src_logger.error(err), process.exit(1);
|
|
9284
9416
|
}
|
|
9285
9417
|
}
|
|
9286
|
-
let src_version = "2.0.0-beta.
|
|
9418
|
+
let src_version = "2.0.0-beta.11";
|
|
9287
9419
|
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, runCLI, src_logger as logger, src_version as version };
|