@rspack/core 1.5.0 → 1.5.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/dist/MultiWatching.d.ts +1 -1
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +2 -16
- package/dist/config/adapterRuleUse.d.ts +26 -2
- package/dist/cssExtractHmr.js +4 -3
- package/dist/index.js +189 -167
- package/dist/schema/config.d.ts +1 -0
- package/dist/schema/loaders.d.ts +1 -0
- package/hot/lazy-compilation-node.js +1 -3
- package/hot/lazy-compilation-web.js +4 -3
- package/package.json +2 -2
package/dist/MultiWatching.d.ts
CHANGED
@@ -18,7 +18,7 @@ declare class MultiWatching {
|
|
18
18
|
* @param compiler - the compiler
|
19
19
|
*/
|
20
20
|
constructor(watchings: Watching[], compiler: MultiCompiler);
|
21
|
-
invalidate(callback
|
21
|
+
invalidate(callback?: Callback<Error, void>): void;
|
22
22
|
invalidateWithChangesAndRemovals(changedFiles?: Set<string>, removedFiles?: Set<string>, callback?: Callback<Error, void>): void;
|
23
23
|
close(callback: Callback<Error, void>): void;
|
24
24
|
suspend(): void;
|
@@ -1,22 +1,8 @@
|
|
1
1
|
import type { Module } from "../../Module";
|
2
2
|
export declare const BuiltinLazyCompilationPlugin: {
|
3
|
-
new (
|
4
|
-
module: string;
|
5
|
-
path: string;
|
6
|
-
}) => {
|
7
|
-
active: boolean;
|
8
|
-
data: string;
|
9
|
-
client: string;
|
10
|
-
}, cacheable: boolean, entries: boolean, imports: boolean, test?: RegExp | ((module: Module) => boolean) | undefined): {
|
3
|
+
new (currentActiveModules: () => Set<string>, entries: boolean, imports: boolean, client: string, test?: RegExp | ((module: Module) => boolean) | undefined): {
|
11
4
|
name: string;
|
12
|
-
_args: [
|
13
|
-
module: string;
|
14
|
-
path: string;
|
15
|
-
}) => {
|
16
|
-
active: boolean;
|
17
|
-
data: string;
|
18
|
-
client: string;
|
19
|
-
}, cacheable: boolean, entries: boolean, imports: boolean, test?: RegExp | ((module: Module) => boolean) | undefined];
|
5
|
+
_args: [currentActiveModules: () => Set<string>, entries: boolean, imports: boolean, client: string, test?: RegExp | ((module: Module) => boolean) | undefined];
|
20
6
|
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
21
7
|
raw(compiler: import("../..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
22
8
|
apply(compiler: import("../..").Compiler): void;
|
@@ -322,8 +322,32 @@ export interface LoaderContext<OptionsType = {}> {
|
|
322
322
|
*/
|
323
323
|
__internal__setParseMeta: (key: string, value: string) => void;
|
324
324
|
}
|
325
|
-
export type LoaderDefinitionFunction<OptionsType = {}, ContextAdditions = {}> = (this: LoaderContext<OptionsType> & ContextAdditions, content: string, sourceMap?: string | SourceMap, additionalData?: AdditionalData) => string | void | Buffer | Promise<string | Buffer>;
|
326
|
-
export type PitchLoaderDefinitionFunction<OptionsType = {}, ContextAdditions = {}> = (this: LoaderContext<OptionsType> & ContextAdditions, remainingRequest: string, previousRequest: string, data: object) => string | void | Buffer | Promise<string | Buffer>;
|
325
|
+
export type LoaderDefinitionFunction<OptionsType = {}, ContextAdditions = {}> = (this: LoaderContext<OptionsType> & ContextAdditions, content: string, sourceMap?: string | SourceMap, additionalData?: AdditionalData) => string | void | Buffer | Promise<string | Buffer | void>;
|
326
|
+
export type PitchLoaderDefinitionFunction<OptionsType = {}, ContextAdditions = {}> = (this: LoaderContext<OptionsType> & ContextAdditions, remainingRequest: string, previousRequest: string, data: object) => string | void | Buffer | Promise<string | Buffer | void>;
|
327
|
+
/**
|
328
|
+
* Defines a loader for Rspack.
|
329
|
+
* A loader is a transformer that converts various types of modules into Rspack
|
330
|
+
* supported types. By using different kinds of loaders, you can extend Rspack to
|
331
|
+
* process additional module types, including JSX, Markdown, Sass, Less, and more.
|
332
|
+
*
|
333
|
+
* @template OptionsType - The type of options that the loader accepts
|
334
|
+
* @template ContextAdditions - Additional properties to add to the loader context
|
335
|
+
*
|
336
|
+
* @example
|
337
|
+
* ```ts
|
338
|
+
* import type { LoaderDefinition } from '@rspack/core';
|
339
|
+
*
|
340
|
+
* type MyLoaderOptions = {
|
341
|
+
* foo: string;
|
342
|
+
* };
|
343
|
+
*
|
344
|
+
* const myLoader: LoaderDefinition<MyLoaderOptions> = function(source) {
|
345
|
+
* return someOperation(source);
|
346
|
+
* };
|
347
|
+
*
|
348
|
+
* export default myLoader;
|
349
|
+
* ```
|
350
|
+
*/
|
327
351
|
export type LoaderDefinition<OptionsType = {}, ContextAdditions = {}> = LoaderDefinitionFunction<OptionsType, ContextAdditions> & {
|
328
352
|
raw?: false;
|
329
353
|
pitch?: PitchLoaderDefinitionFunction;
|
package/dist/cssExtractHmr.js
CHANGED
@@ -40,10 +40,11 @@ function updateCss(el, url) {
|
|
40
40
|
let normalizedUrl;
|
41
41
|
if (url) normalizedUrl = url;
|
42
42
|
else {
|
43
|
-
|
44
|
-
|
43
|
+
let href = el.getAttribute("href");
|
44
|
+
if (!href) return;
|
45
|
+
normalizedUrl = href.split("?")[0];
|
45
46
|
}
|
46
|
-
if (!isUrlRequest(
|
47
|
+
if (!isUrlRequest(el.href) || !1 === el.isLoaded || !normalizedUrl || !(normalizedUrl.indexOf(".css") > -1)) return;
|
47
48
|
el.visited = !0;
|
48
49
|
let newEl = el.cloneNode();
|
49
50
|
newEl.isLoaded = !1, newEl.addEventListener("load", ()=>{
|
package/dist/index.js
CHANGED
@@ -207,6 +207,77 @@ var __webpack_modules__ = {
|
|
207
207
|
}
|
208
208
|
};
|
209
209
|
},
|
210
|
+
"./src/builtin-plugin/base.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
211
|
+
__webpack_require__.d(__webpack_exports__, {
|
212
|
+
Gp: ()=>canInherentFromParent,
|
213
|
+
Xj: ()=>RspackBuiltinPlugin,
|
214
|
+
dE: ()=>createNativePlugin,
|
215
|
+
no: ()=>createBuiltinPlugin,
|
216
|
+
vt: ()=>create
|
217
|
+
});
|
218
|
+
var _rspack_binding__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("@rspack/binding"), _rspack_binding__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(_rspack_binding__WEBPACK_IMPORTED_MODULE_0__);
|
219
|
+
let HOOKS_CAN_NOT_INHERENT_FROM_PARENT = [
|
220
|
+
"make",
|
221
|
+
"compile",
|
222
|
+
"emit",
|
223
|
+
"afterEmit",
|
224
|
+
"invalid",
|
225
|
+
"done",
|
226
|
+
"thisCompilation"
|
227
|
+
];
|
228
|
+
function canInherentFromParent(affectedHooks) {
|
229
|
+
return void 0 !== affectedHooks && !HOOKS_CAN_NOT_INHERENT_FROM_PARENT.includes(affectedHooks);
|
230
|
+
}
|
231
|
+
class RspackBuiltinPlugin {
|
232
|
+
affectedHooks;
|
233
|
+
apply(compiler) {
|
234
|
+
let raw = this.raw(compiler);
|
235
|
+
raw && (raw.canInherentFromParent = canInherentFromParent(this.affectedHooks), compiler.__internal__registerBuiltinPlugin(raw));
|
236
|
+
}
|
237
|
+
}
|
238
|
+
function createBuiltinPlugin(name, options) {
|
239
|
+
return {
|
240
|
+
name: name,
|
241
|
+
options: options ?? !1
|
242
|
+
};
|
243
|
+
}
|
244
|
+
function create(name, resolve, affectedHooks) {
|
245
|
+
class Plugin extends RspackBuiltinPlugin {
|
246
|
+
name = name;
|
247
|
+
_args;
|
248
|
+
affectedHooks = affectedHooks;
|
249
|
+
constructor(...args){
|
250
|
+
super(), this._args = args;
|
251
|
+
}
|
252
|
+
raw(compiler) {
|
253
|
+
return createBuiltinPlugin(name, resolve.apply(compiler, this._args));
|
254
|
+
}
|
255
|
+
}
|
256
|
+
return Object.defineProperty(Plugin, "name", {
|
257
|
+
value: name
|
258
|
+
}), Plugin;
|
259
|
+
}
|
260
|
+
let INTERNAL_PLUGIN_NAMES = Object.keys(_rspack_binding__WEBPACK_IMPORTED_MODULE_0___default().BuiltinPluginName);
|
261
|
+
function createNativePlugin(name, resolve, affectedHooks) {
|
262
|
+
if (INTERNAL_PLUGIN_NAMES.includes(name)) throw Error(`Cannot register native plugin with name '${name}', it conflicts with internal plugin names.`);
|
263
|
+
return create(name, resolve, affectedHooks);
|
264
|
+
}
|
265
|
+
},
|
266
|
+
"./src/builtin-plugin/lazy-compilation/lazyCompilation.ts": function(module, __webpack_exports__, __webpack_require__) {
|
267
|
+
__webpack_require__.d(__webpack_exports__, {
|
268
|
+
a: ()=>BuiltinLazyCompilationPlugin
|
269
|
+
});
|
270
|
+
var _rspack_binding__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("@rspack/binding"), _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./src/builtin-plugin/base.ts");
|
271
|
+
module = __webpack_require__.hmd(module);
|
272
|
+
let BuiltinLazyCompilationPlugin = (0, _base__WEBPACK_IMPORTED_MODULE_1__.vt)(_rspack_binding__WEBPACK_IMPORTED_MODULE_0__.BuiltinPluginName.LazyCompilationPlugin, (currentActiveModules, entries, imports, client, test)=>({
|
273
|
+
module,
|
274
|
+
imports,
|
275
|
+
entries,
|
276
|
+
test,
|
277
|
+
client,
|
278
|
+
currentActiveModules
|
279
|
+
}), "thisCompilation");
|
280
|
+
},
|
210
281
|
"browserslist-load-config": function(module) {
|
211
282
|
module.exports = require("../compiled/browserslist-load-config/index.js");
|
212
283
|
},
|
@@ -258,9 +329,11 @@ function __webpack_require__(moduleId) {
|
|
258
329
|
var cachedModule = __webpack_module_cache__[moduleId];
|
259
330
|
if (void 0 !== cachedModule) return cachedModule.exports;
|
260
331
|
var module = __webpack_module_cache__[moduleId] = {
|
332
|
+
id: moduleId,
|
333
|
+
loaded: !1,
|
261
334
|
exports: {}
|
262
335
|
};
|
263
|
-
return __webpack_modules__[moduleId](module, module.exports, __webpack_require__), module.exports;
|
336
|
+
return __webpack_modules__[moduleId](module, module.exports, __webpack_require__), module.loaded = !0, module.exports;
|
264
337
|
}
|
265
338
|
__webpack_require__.n = (module)=>{
|
266
339
|
var getter = module && module.__esModule ? ()=>module.default : ()=>module;
|
@@ -272,7 +345,12 @@ __webpack_require__.n = (module)=>{
|
|
272
345
|
enumerable: !0,
|
273
346
|
get: definition[key]
|
274
347
|
});
|
275
|
-
}, __webpack_require__.
|
348
|
+
}, __webpack_require__.hmd = (module)=>((module = Object.create(module)).children || (module.children = []), Object.defineProperty(module, 'exports', {
|
349
|
+
enumerable: !0,
|
350
|
+
set: ()=>{
|
351
|
+
throw Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);
|
352
|
+
}
|
353
|
+
}), module), __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = (exports1)=>{
|
276
354
|
'undefined' != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports1, Symbol.toStringTag, {
|
277
355
|
value: 'Module'
|
278
356
|
}), Object.defineProperty(exports1, '__esModule', {
|
@@ -1955,48 +2033,8 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
1955
2033
|
return this.#data.keys()[Symbol.iterator]();
|
1956
2034
|
}
|
1957
2035
|
}
|
1958
|
-
|
1959
|
-
|
1960
|
-
"compile",
|
1961
|
-
"emit",
|
1962
|
-
"afterEmit",
|
1963
|
-
"invalid",
|
1964
|
-
"done",
|
1965
|
-
"thisCompilation"
|
1966
|
-
];
|
1967
|
-
function canInherentFromParent(affectedHooks) {
|
1968
|
-
return void 0 !== affectedHooks && !HOOKS_CAN_NOT_INHERENT_FROM_PARENT.includes(affectedHooks);
|
1969
|
-
}
|
1970
|
-
class RspackBuiltinPlugin {
|
1971
|
-
affectedHooks;
|
1972
|
-
apply(compiler) {
|
1973
|
-
let raw = this.raw(compiler);
|
1974
|
-
raw && (raw.canInherentFromParent = canInherentFromParent(this.affectedHooks), compiler.__internal__registerBuiltinPlugin(raw));
|
1975
|
-
}
|
1976
|
-
}
|
1977
|
-
function createBuiltinPlugin(name, options) {
|
1978
|
-
return {
|
1979
|
-
name: name,
|
1980
|
-
options: options ?? !1
|
1981
|
-
};
|
1982
|
-
}
|
1983
|
-
function base_create(name, resolve, affectedHooks) {
|
1984
|
-
class Plugin extends RspackBuiltinPlugin {
|
1985
|
-
name = name;
|
1986
|
-
_args;
|
1987
|
-
affectedHooks = affectedHooks;
|
1988
|
-
constructor(...args){
|
1989
|
-
super(), this._args = args;
|
1990
|
-
}
|
1991
|
-
raw(compiler) {
|
1992
|
-
return createBuiltinPlugin(name, resolve.apply(compiler, this._args));
|
1993
|
-
}
|
1994
|
-
}
|
1995
|
-
return Object.defineProperty(Plugin, "name", {
|
1996
|
-
value: name
|
1997
|
-
}), Plugin;
|
1998
|
-
}
|
1999
|
-
let INTERNAL_PLUGIN_NAMES = Object.keys(binding_default().BuiltinPluginName), APIPlugin = base_create(binding_.BuiltinPluginName.APIPlugin, ()=>{}), ArrayPushCallbackChunkFormatPlugin = base_create(binding_.BuiltinPluginName.ArrayPushCallbackChunkFormatPlugin, ()=>{}), AssetModulesPlugin = base_create(binding_.BuiltinPluginName.AssetModulesPlugin, ()=>{}, "compilation"), AsyncWebAssemblyModulesPlugin = base_create(binding_.BuiltinPluginName.AsyncWebAssemblyModulesPlugin, ()=>{}, "compilation"), BannerPlugin = base_create(binding_.BuiltinPluginName.BannerPlugin, (args)=>"string" == typeof args || "function" == typeof args ? {
|
2036
|
+
var builtin_plugin_base = __webpack_require__("./src/builtin-plugin/base.ts");
|
2037
|
+
let APIPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.APIPlugin, ()=>{}), ArrayPushCallbackChunkFormatPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.ArrayPushCallbackChunkFormatPlugin, ()=>{}), AssetModulesPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.AssetModulesPlugin, ()=>{}, "compilation"), AsyncWebAssemblyModulesPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.AsyncWebAssemblyModulesPlugin, ()=>{}, "compilation"), BannerPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.BannerPlugin, (args)=>"string" == typeof args || "function" == typeof args ? {
|
2000
2038
|
banner: args
|
2001
2039
|
} : {
|
2002
2040
|
banner: args.banner,
|
@@ -2007,12 +2045,12 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2007
2045
|
stage: args.stage,
|
2008
2046
|
include: args.include,
|
2009
2047
|
exclude: args.exclude
|
2010
|
-
}), BundlerInfoRspackPlugin =
|
2048
|
+
}), BundlerInfoRspackPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.BundlerInfoRspackPlugin, (options)=>({
|
2011
2049
|
version: options.version || "unknown",
|
2012
2050
|
bundler: options.bundler || "rspack",
|
2013
2051
|
force: options.force ?? !0
|
2014
|
-
})), ChunkPrefetchPreloadPlugin =
|
2015
|
-
class CircularDependencyRspackPlugin extends
|
2052
|
+
})), ChunkPrefetchPreloadPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.ChunkPrefetchPreloadPlugin, ()=>{});
|
2053
|
+
class CircularDependencyRspackPlugin extends builtin_plugin_base.Xj {
|
2016
2054
|
name = binding_.BuiltinPluginName.CircularDependencyRspackPlugin;
|
2017
2055
|
_options;
|
2018
2056
|
constructor(options){
|
@@ -2041,15 +2079,15 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2041
2079
|
this._options.onEnd(compilation);
|
2042
2080
|
} : void 0
|
2043
2081
|
};
|
2044
|
-
return
|
2082
|
+
return (0, builtin_plugin_base.no)(this.name, rawOptions);
|
2045
2083
|
}
|
2046
2084
|
}
|
2047
|
-
let CommonJsChunkFormatPlugin =
|
2085
|
+
let CommonJsChunkFormatPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.CommonJsChunkFormatPlugin, ()=>{}), ContextReplacementPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.ContextReplacementPlugin, (resourceRegExp, newContentResource, newContentRecursive, newContentRegExp)=>{
|
2048
2086
|
let rawOptions = {
|
2049
2087
|
resourceRegExp
|
2050
2088
|
};
|
2051
2089
|
return "function" == typeof newContentResource || ("string" == typeof newContentResource && "object" == typeof newContentRecursive ? (rawOptions.newContentResource = newContentResource, rawOptions.newContentCreateContextMap = newContentRecursive) : "string" == typeof newContentResource && "function" == typeof newContentRecursive ? rawOptions.newContentResource = newContentResource : ("string" != typeof newContentResource && (newContentRegExp = newContentRecursive, newContentRecursive = newContentResource, newContentResource = void 0), "boolean" != typeof newContentRecursive && (newContentRegExp = newContentRecursive, newContentRecursive = void 0), rawOptions.newContentResource = newContentResource, rawOptions.newContentRecursive = newContentRecursive, rawOptions.newContentRegExp = newContentRegExp)), rawOptions;
|
2052
|
-
}), CopyRspackPlugin =
|
2090
|
+
}), CopyRspackPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.CopyRspackPlugin, (copy)=>{
|
2053
2091
|
let ret = {
|
2054
2092
|
patterns: []
|
2055
2093
|
};
|
@@ -2060,7 +2098,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2060
2098
|
let originalTransform = pattern.transform;
|
2061
2099
|
return originalTransform && ("object" == typeof originalTransform ? pattern.transform = (input, absoluteFilename)=>Promise.resolve(originalTransform.transformer(input, absoluteFilename)) : pattern.transform = (input, absoluteFilename)=>Promise.resolve(originalTransform(input, absoluteFilename))), pattern;
|
2062
2100
|
}), ret;
|
2063
|
-
}), CssChunkingPlugin =
|
2101
|
+
}), CssChunkingPlugin = (0, builtin_plugin_base.vt)(binding_default().BuiltinPluginName.CssChunkingPlugin, function(options = {}) {
|
2064
2102
|
if (options.nextjs) return {
|
2065
2103
|
strict: options.strict,
|
2066
2104
|
minSize: options.minSize,
|
@@ -2075,7 +2113,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2075
2113
|
cssIndex && splitChunks.defaultSizeTypes.splice(cssIndex, 1);
|
2076
2114
|
}
|
2077
2115
|
return options;
|
2078
|
-
}), CssModulesPlugin =
|
2116
|
+
}), CssModulesPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.CssModulesPlugin, ()=>{}, "compilation"), external_node_path_namespaceObject = require("node:path");
|
2079
2117
|
var external_node_path_default = __webpack_require__.n(external_node_path_namespaceObject);
|
2080
2118
|
let DEFAULT_FILENAME = "[name].css", LOADER_PATH = (0, external_node_path_namespaceObject.join)(__dirname, "cssExtractLoader.js");
|
2081
2119
|
class CssExtractRspackPlugin {
|
@@ -2117,7 +2155,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2117
2155
|
};
|
2118
2156
|
}
|
2119
2157
|
}
|
2120
|
-
let DataUriPlugin =
|
2158
|
+
let DataUriPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.DataUriPlugin, ()=>{}, "compilation"), DefinePlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.DefinePlugin, function(define) {
|
2121
2159
|
return normalizeValue(define, this.options.output.environment?.bigIntLiteral ?? !1);
|
2122
2160
|
}, "compilation"), normalizeValue = (define, supportsBigIntLiteral)=>{
|
2123
2161
|
let normalizePrimitive = (p)=>void 0 === p ? "undefined" : Object.is(p, -0) ? "-0" : p instanceof RegExp ? p.toString() : "function" == typeof p ? `(${p.toString()})` : "bigint" == typeof p ? supportsBigIntLiteral ? `${p}n` : `BigInt("${p}")` : p, normalizeObject = (define)=>Array.isArray(define) ? define.map(normalizeObject) : define instanceof RegExp ? normalizePrimitive(define) : define && "object" == typeof define ? Object.fromEntries(Object.keys(define).map((k)=>[
|
@@ -2126,25 +2164,25 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2126
2164
|
])) : normalizePrimitive(define);
|
2127
2165
|
return normalizeObject(define);
|
2128
2166
|
};
|
2129
|
-
class DeterministicChunkIdsPlugin extends
|
2167
|
+
class DeterministicChunkIdsPlugin extends builtin_plugin_base.Xj {
|
2130
2168
|
name = binding_.BuiltinPluginName.DeterministicChunkIdsPlugin;
|
2131
2169
|
affectedHooks = "compilation";
|
2132
2170
|
raw(compiler) {
|
2133
|
-
return
|
2171
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
2134
2172
|
}
|
2135
2173
|
}
|
2136
|
-
class DeterministicModuleIdsPlugin extends
|
2174
|
+
class DeterministicModuleIdsPlugin extends builtin_plugin_base.Xj {
|
2137
2175
|
name = binding_.BuiltinPluginName.DeterministicModuleIdsPlugin;
|
2138
2176
|
affectedHooks = "compilation";
|
2139
2177
|
raw(compiler) {
|
2140
|
-
return
|
2178
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
2141
2179
|
}
|
2142
2180
|
}
|
2143
|
-
let DllEntryPlugin =
|
2181
|
+
let DllEntryPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.DllEntryPlugin, (context, entries, options)=>({
|
2144
2182
|
context,
|
2145
2183
|
entries,
|
2146
2184
|
name: options.name
|
2147
|
-
})), DllReferenceAgencyPlugin =
|
2185
|
+
})), DllReferenceAgencyPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.DllReferenceAgencyPlugin, (options)=>options), external_node_assert_namespaceObject = require("node:assert");
|
2148
2186
|
var external_node_assert_default = __webpack_require__.n(external_node_assert_namespaceObject);
|
2149
2187
|
class EntryOptionPlugin {
|
2150
2188
|
apply(compiler) {
|
@@ -2174,7 +2212,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2174
2212
|
return options;
|
2175
2213
|
}
|
2176
2214
|
}
|
2177
|
-
let lib_EntryOptionPlugin = EntryOptionPlugin, EntryPlugin =
|
2215
|
+
let lib_EntryOptionPlugin = EntryOptionPlugin, EntryPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.EntryPlugin, (context, entry, options = "")=>({
|
2178
2216
|
context,
|
2179
2217
|
entry,
|
2180
2218
|
options: getRawEntryOptions("string" == typeof options ? {
|
@@ -2197,7 +2235,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2197
2235
|
};
|
2198
2236
|
}
|
2199
2237
|
EntryPlugin.createDependency = (request)=>new binding_.EntryDependency(request);
|
2200
|
-
class DynamicEntryPlugin extends
|
2238
|
+
class DynamicEntryPlugin extends builtin_plugin_base.Xj {
|
2201
2239
|
context;
|
2202
2240
|
entry;
|
2203
2241
|
name = binding_.BuiltinPluginName.DynamicEntryPlugin;
|
@@ -2216,10 +2254,10 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
2216
2254
|
};
|
2217
2255
|
})
|
2218
2256
|
};
|
2219
|
-
return
|
2257
|
+
return (0, builtin_plugin_base.no)(this.name, raw);
|
2220
2258
|
}
|
2221
2259
|
}
|
2222
|
-
let ElectronTargetPlugin =
|
2260
|
+
let ElectronTargetPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.ElectronTargetPlugin, (context)=>context ?? "none"), EnableChunkLoadingPluginInner = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.EnableChunkLoadingPlugin, (type)=>type), enabledTypes = new WeakMap(), getEnabledTypes = (compiler)=>{
|
2223
2261
|
let set = enabledTypes.get(compiler);
|
2224
2262
|
return void 0 === set && (set = new Set(), enabledTypes.set(compiler, set)), set;
|
2225
2263
|
};
|
@@ -2249,7 +2287,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
2249
2287
|
let set = EnableLibraryPlugin_enabledTypes.get(compiler);
|
2250
2288
|
return void 0 === set && (set = new Set(), EnableLibraryPlugin_enabledTypes.set(compiler, set)), set;
|
2251
2289
|
};
|
2252
|
-
class EnableLibraryPlugin extends
|
2290
|
+
class EnableLibraryPlugin extends builtin_plugin_base.Xj {
|
2253
2291
|
type;
|
2254
2292
|
name = binding_.BuiltinPluginName.EnableLibraryPlugin;
|
2255
2293
|
constructor(type){
|
@@ -2263,10 +2301,10 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
2263
2301
|
}
|
2264
2302
|
raw(compiler) {
|
2265
2303
|
let type = this.type, enabled = EnableLibraryPlugin_getEnabledTypes(compiler);
|
2266
|
-
if (!enabled.has(type)) return enabled.add(type),
|
2304
|
+
if (!enabled.has(type)) return enabled.add(type), (0, builtin_plugin_base.no)(this.name, type);
|
2267
2305
|
}
|
2268
2306
|
}
|
2269
|
-
let EnableWasmLoadingPlugin =
|
2307
|
+
let EnableWasmLoadingPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.EnableWasmLoadingPlugin, (type)=>type), EnsureChunkConditionsPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.EnsureChunkConditionsPlugin, ()=>{}), EvalDevToolModulePlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.EvalDevToolModulePlugin, (options)=>options, "compilation"), EvalSourceMapDevToolPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.EvalSourceMapDevToolPlugin, (options)=>options, "compilation");
|
2270
2308
|
function isNil(value) {
|
2271
2309
|
return null == value;
|
2272
2310
|
}
|
@@ -4005,7 +4043,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
4005
4043
|
esModule: options.esModule
|
4006
4044
|
};
|
4007
4045
|
}
|
4008
|
-
class ExternalsPlugin extends
|
4046
|
+
class ExternalsPlugin extends builtin_plugin_base.Xj {
|
4009
4047
|
type;
|
4010
4048
|
externals;
|
4011
4049
|
placeInInitial;
|
@@ -4022,7 +4060,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
4022
4060
|
]).filter(Boolean).map((item)=>this.#getRawExternalItem(item)),
|
4023
4061
|
placeInInitial: this.placeInInitial ?? !1
|
4024
4062
|
};
|
4025
|
-
return
|
4063
|
+
return (0, builtin_plugin_base.no)(this.name, raw);
|
4026
4064
|
}
|
4027
4065
|
#processResolveResult = (text)=>{
|
4028
4066
|
if (!text) return;
|
@@ -4099,8 +4137,8 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
4099
4137
|
]
|
4100
4138
|
])) : value;
|
4101
4139
|
}
|
4102
|
-
let FetchCompileAsyncWasmPlugin =
|
4103
|
-
class FlagDependencyUsagePlugin extends
|
4140
|
+
let FetchCompileAsyncWasmPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.FetchCompileAsyncWasmPlugin, ()=>{}, "thisCompilation"), FileUriPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.FileUriPlugin, ()=>{}, "compilation"), FlagDependencyExportsPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.FlagDependencyExportsPlugin, ()=>{}, "compilation");
|
4141
|
+
class FlagDependencyUsagePlugin extends builtin_plugin_base.Xj {
|
4104
4142
|
global;
|
4105
4143
|
name = binding_.BuiltinPluginName.FlagDependencyUsagePlugin;
|
4106
4144
|
affectedHooks = "compilation";
|
@@ -4108,16 +4146,16 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
4108
4146
|
super(), this.global = global;
|
4109
4147
|
}
|
4110
4148
|
raw(compiler) {
|
4111
|
-
return
|
4149
|
+
return (0, builtin_plugin_base.no)(this.name, this.global);
|
4112
4150
|
}
|
4113
4151
|
}
|
4114
|
-
class HotModuleReplacementPlugin extends
|
4152
|
+
class HotModuleReplacementPlugin extends builtin_plugin_base.Xj {
|
4115
4153
|
name = binding_.BuiltinPluginName.HotModuleReplacementPlugin;
|
4116
4154
|
raw(compiler) {
|
4117
|
-
return void 0 === compiler.options.output.strictModuleErrorHandling && (compiler.options.output.strictModuleErrorHandling = !0),
|
4155
|
+
return void 0 === compiler.options.output.strictModuleErrorHandling && (compiler.options.output.strictModuleErrorHandling = !0), (0, builtin_plugin_base.no)(this.name, void 0);
|
4118
4156
|
}
|
4119
4157
|
}
|
4120
|
-
let HttpExternalsRspackPlugin =
|
4158
|
+
let HttpExternalsRspackPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.HttpExternalsRspackPlugin, (css, webAsync)=>({
|
4121
4159
|
css,
|
4122
4160
|
webAsync
|
4123
4161
|
})), getHttp = memoize(()=>__webpack_require__("node:http")), getHttps = memoize(()=>__webpack_require__("node:https")), defaultHttpClientForNode = async (url, headers)=>{
|
@@ -4150,7 +4188,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
4150
4188
|
body: Buffer.from(body)
|
4151
4189
|
};
|
4152
4190
|
};
|
4153
|
-
class HttpUriPlugin extends
|
4191
|
+
class HttpUriPlugin extends builtin_plugin_base.Xj {
|
4154
4192
|
options;
|
4155
4193
|
name = binding_.BuiltinPluginName.HttpUriPlugin;
|
4156
4194
|
affectedHooks = "compilation";
|
@@ -4165,7 +4203,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
4165
4203
|
upgrade: options.upgrade ?? !1,
|
4166
4204
|
httpClient: options.httpClient ?? defaultHttpClientForNode
|
4167
4205
|
};
|
4168
|
-
return
|
4206
|
+
return (0, builtin_plugin_base.no)(this.name, raw);
|
4169
4207
|
}
|
4170
4208
|
}
|
4171
4209
|
function $constructor(name, initializer, params) {
|
@@ -7097,7 +7135,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
7097
7135
|
}
|
7098
7136
|
let compilationOptionsMap = new WeakMap(), external_node_fs_namespaceObject = require("node:fs");
|
7099
7137
|
var external_node_fs_default = __webpack_require__.n(external_node_fs_namespaceObject);
|
7100
|
-
let hooks_compilationHooksMap = new WeakMap(), HTML_PLUGIN_UID = 0, HtmlRspackPluginImpl =
|
7138
|
+
let hooks_compilationHooksMap = new WeakMap(), HTML_PLUGIN_UID = 0, HtmlRspackPluginImpl = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.HtmlRspackPlugin, function(c = {}) {
|
7101
7139
|
let templateFn, templateParameters, filenames;
|
7102
7140
|
validate(c, getHtmlPluginOptionsSchema);
|
7103
7141
|
let uid = HTML_PLUGIN_UID++, meta = {};
|
@@ -7248,12 +7286,12 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
7248
7286
|
])
|
7249
7287
|
}, hooks_compilationHooksMap.set(compilation, hooks)), hooks;
|
7250
7288
|
}, HtmlRspackPlugin.version = 5;
|
7251
|
-
let IgnorePlugin =
|
7252
|
-
class JavascriptModulesPlugin extends
|
7289
|
+
let IgnorePlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.IgnorePlugin, (options)=>(validate(options, getIgnorePluginOptionsSchema), options)), InferAsyncModulesPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.InferAsyncModulesPlugin, ()=>{}, "compilation"), JavascriptModulesPlugin_compilationHooksMap = new WeakMap();
|
7290
|
+
class JavascriptModulesPlugin extends builtin_plugin_base.Xj {
|
7253
7291
|
name = binding_.BuiltinPluginName.JavascriptModulesPlugin;
|
7254
7292
|
affectedHooks = "compilation";
|
7255
7293
|
raw() {
|
7256
|
-
return
|
7294
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
7257
7295
|
}
|
7258
7296
|
static getCompilationHooks(compilation) {
|
7259
7297
|
checkCompilation(compilation);
|
@@ -7266,7 +7304,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
7266
7304
|
}, JavascriptModulesPlugin_compilationHooksMap.set(compilation, hooks)), hooks;
|
7267
7305
|
}
|
7268
7306
|
}
|
7269
|
-
let JsLoaderRspackPlugin =
|
7307
|
+
let JsLoaderRspackPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.JsLoaderRspackPlugin, (compiler)=>runLoaders.bind(null, compiler), "thisCompilation"), JsonModulesPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.JsonModulesPlugin, ()=>{}, "compilation"), LibManifestPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.LibManifestPlugin, (options)=>{
|
7270
7308
|
let { context, entryOnly, format, name, path, type } = options;
|
7271
7309
|
return {
|
7272
7310
|
context,
|
@@ -7276,7 +7314,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
7276
7314
|
path,
|
7277
7315
|
type
|
7278
7316
|
};
|
7279
|
-
}), LightningCssMinimizerRspackPlugin =
|
7317
|
+
}), LightningCssMinimizerRspackPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.LightningCssMinimizerRspackPlugin, (options)=>{
|
7280
7318
|
let { include, exclude, draft, nonStandard, pseudoClasses, drafts } = options?.minimizerOptions ?? {}, targets = options?.minimizerOptions?.targets ?? "fully supports es6";
|
7281
7319
|
return {
|
7282
7320
|
test: options?.test,
|
@@ -7303,51 +7341,36 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
7303
7341
|
pseudoClasses
|
7304
7342
|
}
|
7305
7343
|
};
|
7306
|
-
}), LimitChunkCountPlugin =
|
7307
|
-
|
7308
|
-
|
7309
|
-
imports,
|
7310
|
-
entries,
|
7311
|
-
test
|
7312
|
-
}), "thisCompilation"), LAZY_COMPILATION_PREFIX = "/lazy-compilation-using-", noop = (_req, _res, next)=>{
|
7344
|
+
}), LimitChunkCountPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.LimitChunkCountPlugin, (options)=>options);
|
7345
|
+
var lazyCompilation = __webpack_require__("./src/builtin-plugin/lazy-compilation/lazyCompilation.ts");
|
7346
|
+
let LAZY_COMPILATION_PREFIX = "/lazy-compilation-using-", noop = (_req, _res, next)=>{
|
7313
7347
|
"function" == typeof next && next();
|
7314
7348
|
}, DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN = "The `experiments.lazyCompilation` option is deprecated, please use the configuration top level `lazyCompilation` instead.", REPEAT_LAZY_COMPILATION_OPTIONS_WARN = "Both top-level `lazyCompilation` and `experiments.lazyCompilation` options are set. The top-level `lazyCompilation` configuration will take precedence.";
|
7315
|
-
function applyPlugin(compiler, options, activeModules
|
7316
|
-
|
7317
|
-
|
7318
|
-
|
7319
|
-
|
7320
|
-
|
7321
|
-
|
7322
|
-
|
7323
|
-
|
7324
|
-
|
7325
|
-
|
7326
|
-
active
|
7327
|
-
};
|
7328
|
-
}, options.cacheable ?? !0, options.entries ?? !0, options.imports ?? !0, options.test).apply(compiler);
|
7329
|
-
}
|
7330
|
-
let lazyCompilationMiddlewareInternal = (compiler, activeModules, filesByKey, lazyCompilationPrefix)=>{
|
7349
|
+
function applyPlugin(compiler, options, activeModules) {
|
7350
|
+
let compiler1;
|
7351
|
+
new lazyCompilation.a(()=>{
|
7352
|
+
let res = new Set(activeModules);
|
7353
|
+
return activeModules.clear(), res;
|
7354
|
+
}, options.entries ?? !0, options.imports ?? !0, `${options.client || (compiler1 = compiler, require.resolve(`../hot/lazy-compilation-${compiler1.options.externalsPresets.node ? "node" : "web"}.js`))}?${encodeURIComponent((({ serverUrl, prefix })=>{
|
7355
|
+
let lazyCompilationPrefix = prefix || LAZY_COMPILATION_PREFIX;
|
7356
|
+
return serverUrl ? serverUrl + (serverUrl.endsWith("/") ? lazyCompilationPrefix.slice(1) : lazyCompilationPrefix) : lazyCompilationPrefix;
|
7357
|
+
})(options))}`, options.test).apply(compiler);
|
7358
|
+
}
|
7359
|
+
let lazyCompilationMiddlewareInternal = (compiler, activeModules, lazyCompilationPrefix)=>{
|
7331
7360
|
let logger = compiler.getInfrastructureLogger("LazyCompilation");
|
7332
7361
|
return (req, res, next)=>{
|
7333
7362
|
if (!req.url?.startsWith(lazyCompilationPrefix)) return next?.();
|
7334
|
-
let modules = req.url.slice(lazyCompilationPrefix.length).split("@");
|
7363
|
+
let modules = req.url.slice(lazyCompilationPrefix.length).split("@").map(decodeURIComponent);
|
7335
7364
|
req.socket.setNoDelay(!0), res.setHeader("content-type", "text/event-stream"), res.writeHead(200), res.write("\n");
|
7336
7365
|
let moduleActivated = [];
|
7337
7366
|
for (let key of modules){
|
7338
7367
|
let activated = activeModules.has(key);
|
7339
7368
|
activeModules.add(key), activated || (logger.log(`${key} is now in use and will be compiled.`), moduleActivated.push(key));
|
7340
7369
|
}
|
7341
|
-
|
7342
|
-
let rebuiltModules = new Set(moduleActivated.map((key)=>{
|
7343
|
-
let filePath = filesByKey.get(key);
|
7344
|
-
return filePath || logger.warn(`Cannot find correct file path for module ${key}`), filePath;
|
7345
|
-
}).filter(Boolean));
|
7346
|
-
rebuiltModules.size && compiler.watching.invalidateWithChangesAndRemovals(rebuiltModules);
|
7347
|
-
}
|
7370
|
+
moduleActivated.length && compiler.watching && compiler.watching.invalidate();
|
7348
7371
|
};
|
7349
7372
|
};
|
7350
|
-
class MangleExportsPlugin extends
|
7373
|
+
class MangleExportsPlugin extends builtin_plugin_base.Xj {
|
7351
7374
|
deterministic;
|
7352
7375
|
name = binding_.BuiltinPluginName.MangleExportsPlugin;
|
7353
7376
|
affectedHooks = "compilation";
|
@@ -7355,47 +7378,47 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
7355
7378
|
super(), this.deterministic = deterministic;
|
7356
7379
|
}
|
7357
7380
|
raw(compiler) {
|
7358
|
-
return
|
7381
|
+
return (0, builtin_plugin_base.no)(this.name, this.deterministic);
|
7359
7382
|
}
|
7360
7383
|
}
|
7361
|
-
let MergeDuplicateChunksPlugin =
|
7362
|
-
class ModuleConcatenationPlugin extends
|
7384
|
+
let MergeDuplicateChunksPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.MergeDuplicateChunksPlugin, ()=>{}), ModuleChunkFormatPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.ModuleChunkFormatPlugin, ()=>{});
|
7385
|
+
class ModuleConcatenationPlugin extends builtin_plugin_base.Xj {
|
7363
7386
|
name = binding_.BuiltinPluginName.ModuleConcatenationPlugin;
|
7364
7387
|
affectedHooks = "compilation";
|
7365
7388
|
raw(compiler) {
|
7366
|
-
return
|
7389
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
7367
7390
|
}
|
7368
7391
|
}
|
7369
|
-
let ModuleInfoHeaderPlugin =
|
7370
|
-
class NaturalChunkIdsPlugin extends
|
7392
|
+
let ModuleInfoHeaderPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.ModuleInfoHeaderPlugin, (verbose)=>verbose, "compilation"), NamedChunkIdsPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.NamedChunkIdsPlugin, ()=>{}, "compilation"), NamedModuleIdsPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.NamedModuleIdsPlugin, ()=>{}, "compilation");
|
7393
|
+
class NaturalChunkIdsPlugin extends builtin_plugin_base.Xj {
|
7371
7394
|
name = binding_.BuiltinPluginName.NaturalChunkIdsPlugin;
|
7372
7395
|
affectedHooks = "compilation";
|
7373
7396
|
raw(compiler) {
|
7374
|
-
return
|
7397
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
7375
7398
|
}
|
7376
7399
|
}
|
7377
|
-
class NaturalModuleIdsPlugin extends
|
7400
|
+
class NaturalModuleIdsPlugin extends builtin_plugin_base.Xj {
|
7378
7401
|
name = binding_.BuiltinPluginName.NaturalModuleIdsPlugin;
|
7379
7402
|
affectedHooks = "compilation";
|
7380
7403
|
raw(compiler) {
|
7381
|
-
return
|
7404
|
+
return (0, builtin_plugin_base.no)(this.name, void 0);
|
7382
7405
|
}
|
7383
7406
|
}
|
7384
|
-
let NodeTargetPlugin =
|
7407
|
+
let NodeTargetPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.NodeTargetPlugin, ()=>void 0), NoEmitOnErrorsPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.NoEmitOnErrorsPlugin, ()=>void 0), NormalModuleReplacementPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.NormalModuleReplacementPlugin, (resourceRegExp, newResource)=>({
|
7385
7408
|
resourceRegExp,
|
7386
7409
|
newResource: "function" == typeof newResource ? (data)=>(newResource(data), data) : newResource
|
7387
|
-
})), OccurrenceChunkIdsPlugin =
|
7410
|
+
})), OccurrenceChunkIdsPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.OccurrenceChunkIdsPlugin, (options)=>({
|
7388
7411
|
...options
|
7389
|
-
}), "compilation"), ProgressPlugin =
|
7412
|
+
}), "compilation"), ProgressPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.ProgressPlugin, (progress = {})=>"function" == typeof progress ? {
|
7390
7413
|
handler: (percentage, msg, items)=>{
|
7391
7414
|
progress(percentage, msg, ...items);
|
7392
7415
|
}
|
7393
|
-
} : progress), ProvidePlugin =
|
7416
|
+
} : progress), ProvidePlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.ProvidePlugin, (provide)=>Object.fromEntries(Object.entries(provide).map(([key, value])=>("string" == typeof value && (value = [
|
7394
7417
|
value
|
7395
7418
|
]), [
|
7396
7419
|
key,
|
7397
7420
|
value
|
7398
|
-
]))), "compilation"), RealContentHashPlugin =
|
7421
|
+
]))), "compilation"), RealContentHashPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.RealContentHashPlugin, ()=>{}, "compilation"), RemoveDuplicateModulesPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.RemoveDuplicateModulesPlugin, ()=>({})), RemoveEmptyChunksPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.RemoveEmptyChunksPlugin, ()=>{}, "compilation"), RsdoctorPluginImpl = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.RsdoctorPlugin, function(c = {
|
7399
7422
|
moduleGraphFeatures: !0,
|
7400
7423
|
chunkGraphFeatures: !0
|
7401
7424
|
}) {
|
@@ -7426,7 +7449,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
7426
7449
|
])
|
7427
7450
|
}, RsdoctorPlugin_compilationHooksMap.set(compilation, hooks)), hooks;
|
7428
7451
|
};
|
7429
|
-
let RslibPlugin =
|
7452
|
+
let RslibPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.RslibPlugin, (rslib)=>rslib), RstestPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.RstestPlugin, (rstest)=>rstest), RuntimeChunkPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.RuntimeChunkPlugin, (options)=>options, "thisCompilation"), RuntimePlugin = (0, builtin_plugin_base.vt)(binding_default().BuiltinPluginName.RuntimePlugin, ()=>{}, "compilation"), RuntimePlugin_compilationHooksMap = new WeakMap();
|
7430
7453
|
RuntimePlugin.getHooks = RuntimePlugin.getCompilationHooks = (compilation)=>{
|
7431
7454
|
checkCompilation(compilation);
|
7432
7455
|
let hooks = RuntimePlugin_compilationHooksMap.get(compilation);
|
@@ -7445,13 +7468,13 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
7445
7468
|
])
|
7446
7469
|
}, RuntimePlugin_compilationHooksMap.set(compilation, hooks)), hooks;
|
7447
7470
|
};
|
7448
|
-
let SideEffectsFlagPlugin =
|
7471
|
+
let SideEffectsFlagPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.SideEffectsFlagPlugin, ()=>{}, "compilation"), SizeLimitsPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.SizeLimitsPlugin, (options)=>{
|
7449
7472
|
let hints = !1 === options.hints ? void 0 : options.hints;
|
7450
7473
|
return {
|
7451
7474
|
...options,
|
7452
7475
|
hints
|
7453
7476
|
};
|
7454
|
-
}), SourceMapDevToolPlugin =
|
7477
|
+
}), SourceMapDevToolPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.SourceMapDevToolPlugin, (options)=>options, "compilation");
|
7455
7478
|
class JsSplitChunkSizes {
|
7456
7479
|
static __to_binding(sizes) {
|
7457
7480
|
return "number" == typeof sizes ? sizes : sizes && "object" == typeof sizes ? {
|
@@ -7459,7 +7482,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
7459
7482
|
} : sizes;
|
7460
7483
|
}
|
7461
7484
|
}
|
7462
|
-
class SplitChunksPlugin extends
|
7485
|
+
class SplitChunksPlugin extends builtin_plugin_base.Xj {
|
7463
7486
|
options;
|
7464
7487
|
name = binding_.BuiltinPluginName.SplitChunksPlugin;
|
7465
7488
|
affectedHooks = "thisCompilation";
|
@@ -7517,10 +7540,10 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
7517
7540
|
...passThrough
|
7518
7541
|
};
|
7519
7542
|
}(this.options, compiler);
|
7520
|
-
return external_node_assert_default()(void 0 !== rawOptions),
|
7543
|
+
return external_node_assert_default()(void 0 !== rawOptions), (0, builtin_plugin_base.no)(this.name, rawOptions);
|
7521
7544
|
}
|
7522
7545
|
}
|
7523
|
-
let SubresourceIntegrityPlugin_PLUGIN_NAME = "SubresourceIntegrityPlugin", NATIVE_HTML_PLUGIN = "HtmlRspackPlugin", NativeSubresourceIntegrityPlugin =
|
7546
|
+
let SubresourceIntegrityPlugin_PLUGIN_NAME = "SubresourceIntegrityPlugin", NATIVE_HTML_PLUGIN = "HtmlRspackPlugin", NativeSubresourceIntegrityPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.SubresourceIntegrityPlugin, function(options) {
|
7524
7547
|
let htmlPlugin = "Disabled";
|
7525
7548
|
return options.htmlPlugin === NATIVE_HTML_PLUGIN ? htmlPlugin = "Native" : "string" == typeof options.htmlPlugin && (htmlPlugin = "JavaScript"), {
|
7526
7549
|
hashFuncNames: options.hashFuncNames,
|
@@ -7646,7 +7669,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
7646
7669
|
function normalizePath(path) {
|
7647
7670
|
return path.replace(/\?.*$/, "").split(external_node_path_namespaceObject.sep).join("/");
|
7648
7671
|
}
|
7649
|
-
let SwcJsMinimizerRspackPlugin =
|
7672
|
+
let SwcJsMinimizerRspackPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.SwcJsMinimizerRspackPlugin, (options)=>{
|
7650
7673
|
let compress = options?.minimizerOptions?.compress ?? !0, mangle = options?.minimizerOptions?.mangle ?? !0, ecma = options?.minimizerOptions?.ecma ?? 5, format = {
|
7651
7674
|
comments: !1,
|
7652
7675
|
...options?.minimizerOptions?.format
|
@@ -7695,14 +7718,14 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
7695
7718
|
module: options?.minimizerOptions?.module
|
7696
7719
|
}
|
7697
7720
|
};
|
7698
|
-
}, "compilation"), WarnCaseSensitiveModulesPlugin =
|
7699
|
-
class WebWorkerTemplatePlugin extends
|
7721
|
+
}, "compilation"), WarnCaseSensitiveModulesPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.WarnCaseSensitiveModulesPlugin, ()=>{}, "compilation");
|
7722
|
+
class WebWorkerTemplatePlugin extends builtin_plugin_base.Xj {
|
7700
7723
|
name = binding_.BuiltinPluginName.WebWorkerTemplatePlugin;
|
7701
7724
|
raw(compiler) {
|
7702
|
-
return compiler.options.output.chunkLoading = "import-scripts",
|
7725
|
+
return compiler.options.output.chunkLoading = "import-scripts", (0, builtin_plugin_base.no)(this.name, void 0);
|
7703
7726
|
}
|
7704
7727
|
}
|
7705
|
-
class WorkerPlugin extends
|
7728
|
+
class WorkerPlugin extends builtin_plugin_base.Xj {
|
7706
7729
|
chunkLoading;
|
7707
7730
|
wasmLoading;
|
7708
7731
|
module;
|
@@ -7712,7 +7735,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
7712
7735
|
super(), this.chunkLoading = chunkLoading, this.wasmLoading = wasmLoading, this.module = module, this.workerPublicPath = workerPublicPath;
|
7713
7736
|
}
|
7714
7737
|
raw(compiler) {
|
7715
|
-
return this.chunkLoading && new EnableChunkLoadingPlugin(this.chunkLoading).apply(compiler), this.wasmLoading && new EnableWasmLoadingPlugin(this.wasmLoading).apply(compiler),
|
7738
|
+
return this.chunkLoading && new EnableChunkLoadingPlugin(this.chunkLoading).apply(compiler), this.wasmLoading && new EnableWasmLoadingPlugin(this.wasmLoading).apply(compiler), (0, builtin_plugin_base.no)(this.name, void 0);
|
7716
7739
|
}
|
7717
7740
|
}
|
7718
7741
|
class ContextModuleFactory {
|
@@ -8627,9 +8650,9 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
8627
8650
|
let tty = infrastructureLogging.stream?.isTTY && "dumb" !== process.env.TERM;
|
8628
8651
|
D(infrastructureLogging, "level", "info"), D(infrastructureLogging, "debug", !1), D(infrastructureLogging, "colors", tty), D(infrastructureLogging, "appendOnly", !tty);
|
8629
8652
|
}, applyExperimentsDefaults = (experiments, { production, development })=>{
|
8630
|
-
defaults_F(experiments, "cache", ()=>development), D(experiments, "futureDefaults", !1), D(experiments, "lazyCompilation", !1), D(experiments, "asyncWebAssembly", experiments.futureDefaults), D(experiments, "css", !!experiments.futureDefaults || void 0), D(experiments, "layers", !1), !1 === experiments.topLevelAwait && console.warn("`experiments.topLevelAwait` config has been deprecated and will be removed in Rspack v2.0. Top-level await will be always enabled. Please remove this option from your Rspack configuration."), D(experiments, "topLevelAwait", !0), D(experiments, "buildHttp", void 0), experiments.buildHttp && "object" == typeof experiments.buildHttp && D(experiments.buildHttp, "upgrade", !1), D(experiments, "incremental", {}), "object" == typeof experiments.incremental && (D(experiments.incremental, "silent", !0), D(experiments.incremental, "make", !0), D(experiments.incremental, "inferAsyncModules", !0), D(experiments.incremental, "providedExports", !0), D(experiments.incremental, "dependenciesDiagnostics", !0), D(experiments.incremental, "sideEffects", !0), D(experiments.incremental, "buildChunkGraph", !
|
8653
|
+
defaults_F(experiments, "cache", ()=>development), D(experiments, "futureDefaults", !1), D(experiments, "lazyCompilation", !1), D(experiments, "asyncWebAssembly", experiments.futureDefaults), D(experiments, "css", !!experiments.futureDefaults || void 0), D(experiments, "layers", !1), !1 === experiments.topLevelAwait && console.warn("`experiments.topLevelAwait` config has been deprecated and will be removed in Rspack v2.0. Top-level await will be always enabled. Please remove this option from your Rspack configuration."), D(experiments, "topLevelAwait", !0), D(experiments, "buildHttp", void 0), experiments.buildHttp && "object" == typeof experiments.buildHttp && D(experiments.buildHttp, "upgrade", !1), D(experiments, "incremental", {}), "object" == typeof experiments.incremental && (D(experiments.incremental, "silent", !0), D(experiments.incremental, "make", !0), D(experiments.incremental, "inferAsyncModules", !0), D(experiments.incremental, "providedExports", !0), D(experiments.incremental, "dependenciesDiagnostics", !0), D(experiments.incremental, "sideEffects", !0), D(experiments.incremental, "buildChunkGraph", !1), D(experiments.incremental, "moduleIds", !0), D(experiments.incremental, "chunkIds", !0), D(experiments.incremental, "modulesHashes", !0), D(experiments.incremental, "modulesCodegen", !0), D(experiments.incremental, "modulesRuntimeRequirements", !0), D(experiments.incremental, "chunksRuntimeRequirements", !0), D(experiments.incremental, "chunksHashes", !0), D(experiments.incremental, "chunksRender", !0), D(experiments.incremental, "emitAssets", !0)), D(experiments, "rspackFuture", {}), D(experiments, "parallelCodeSplitting", !1), D(experiments, "parallelLoader", !1), D(experiments, "useInputFileSystem", !1), D(experiments, "inlineConst", !1), D(experiments, "inlineEnum", !1), D(experiments, "typeReexportsPresence", !1), D(experiments, "lazyBarrel", !1);
|
8631
8654
|
}, applybundlerInfoDefaults = (rspackFuture, library)=>{
|
8632
|
-
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.5.
|
8655
|
+
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.5.2"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
|
8633
8656
|
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties, mode, uniqueName, inlineConst })=>{
|
8634
8657
|
if (assertNotNill(module.parser), assertNotNill(module.generator), defaults_F(module.parser, "asset", ()=>({})), assertNotNill(module.parser.asset), defaults_F(module.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module.parser.asset.dataUrlCondition && D(module.parser.asset.dataUrlCondition, "maxSize", 8096), defaults_F(module.parser, "javascript", ()=>({})), assertNotNill(module.parser.javascript), ((parserOptions, { inlineConst })=>{
|
8635
8658
|
D(parserOptions, "dynamicImportMode", "lazy"), D(parserOptions, "dynamicImportPrefetch", !1), D(parserOptions, "dynamicImportPreload", !1), D(parserOptions, "url", !0), D(parserOptions, "exprContextCritical", !0), D(parserOptions, "unknownContextCritical", !0), D(parserOptions, "wrappedContextCritical", !1), D(parserOptions, "wrappedContextRegExp", /.*/), D(parserOptions, "strictExportPresence", !1), D(parserOptions, "requireAsExpression", !0), D(parserOptions, "requireDynamic", !0), D(parserOptions, "requireResolve", !0), D(parserOptions, "importDynamic", !0), D(parserOptions, "worker", [
|
@@ -10272,7 +10295,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
10272
10295
|
});
|
10273
10296
|
}
|
10274
10297
|
}
|
10275
|
-
let CORE_VERSION = "1.5.
|
10298
|
+
let CORE_VERSION = "1.5.2", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
|
10276
10299
|
|
10277
10300
|
Help:
|
10278
10301
|
Looks like you are using a custom binding (via environment variable 'RSPACK_BINDING=${process.env.RSPACK_BINDING}').
|
@@ -10787,7 +10810,7 @@ Help:
|
|
10787
10810
|
for(let hookName in childCompiler.#builtinPlugins = [
|
10788
10811
|
...childCompiler.#builtinPlugins,
|
10789
10812
|
...this.#builtinPlugins.filter((plugin)=>!0 === plugin.canInherentFromParent)
|
10790
|
-
], this.hooks)
|
10813
|
+
], this.hooks)(0, builtin_plugin_base.Gp)(hookName) && childCompiler.hooks[hookName] && (childCompiler.hooks[hookName].taps = this.hooks[hookName].taps.slice());
|
10791
10814
|
return compilation.hooks.childCompiler.call(childCompiler, compilerName, compilerIndex), childCompiler;
|
10792
10815
|
}
|
10793
10816
|
isChild() {
|
@@ -11556,7 +11579,7 @@ Help:
|
|
11556
11579
|
obj.children = this.stats.map((stat, idx)=>{
|
11557
11580
|
let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
|
11558
11581
|
return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
|
11559
|
-
}), childOptions.version && (obj.rspackVersion = "1.5.
|
11582
|
+
}), childOptions.version && (obj.rspackVersion = "1.5.2", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
|
11560
11583
|
let mapError = (j, obj)=>({
|
11561
11584
|
...obj,
|
11562
11585
|
compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
|
@@ -12456,7 +12479,7 @@ Help:
|
|
12456
12479
|
object.hash = context.getStatsCompilation(compilation).hash;
|
12457
12480
|
},
|
12458
12481
|
version: (object)=>{
|
12459
|
-
object.version = "5.75.0", object.rspackVersion = "1.5.
|
12482
|
+
object.version = "5.75.0", object.rspackVersion = "1.5.2";
|
12460
12483
|
},
|
12461
12484
|
env: (object, _compilation, _context, { _env })=>{
|
12462
12485
|
object.env = _env;
|
@@ -13916,7 +13939,7 @@ Help:
|
|
13916
13939
|
return this._emitFile(filename, JsSource.__to_binding(source), assetInfo);
|
13917
13940
|
}
|
13918
13941
|
});
|
13919
|
-
let asRegExp = (test)=>"string" == typeof test ? RegExp(`^${test.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")}`) : test, matchPart = (str, test)=>!test || (Array.isArray(test) ? test.map(asRegExp).some((regExp)=>regExp.test(str)) : asRegExp(test).test(str)), matchObject = (obj, str)=>!(obj.test && !matchPart(str, obj.test) || obj.include && !matchPart(str, obj.include) || obj.exclude && matchPart(str, obj.exclude)), FlagAllModulesAsUsedPlugin =
|
13942
|
+
let asRegExp = (test)=>"string" == typeof test ? RegExp(`^${test.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")}`) : test, matchPart = (str, test)=>!test || (Array.isArray(test) ? test.map(asRegExp).some((regExp)=>regExp.test(str)) : asRegExp(test).test(str)), matchObject = (obj, str)=>!(obj.test && !matchPart(str, obj.test) || obj.include && !matchPart(str, obj.include) || obj.exclude && matchPart(str, obj.exclude)), FlagAllModulesAsUsedPlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.FlagAllModulesAsUsedPlugin, (explanation)=>({
|
13920
13943
|
explanation
|
13921
13944
|
}));
|
13922
13945
|
class DllPlugin {
|
@@ -14534,6 +14557,7 @@ Help:
|
|
14534
14557
|
"2022-03"
|
14535
14558
|
]),
|
14536
14559
|
treatConstEnumAsEnum: schemas_boolean(),
|
14560
|
+
tsEnumIsMutable: schemas_boolean(),
|
14537
14561
|
useDefineForClassFields: schemas_boolean(),
|
14538
14562
|
verbatimModuleSyntax: schemas_boolean()
|
14539
14563
|
}).partial(), ZodSwcJsMinifyOptions = strictObject({
|
@@ -15377,6 +15401,7 @@ Help:
|
|
15377
15401
|
serverUrl: schemas_string(),
|
15378
15402
|
prefix: schemas_string()
|
15379
15403
|
}).partial(), incremental = strictObject({
|
15404
|
+
silent: schemas_boolean(),
|
15380
15405
|
make: schemas_boolean(),
|
15381
15406
|
inferAsyncModules: schemas_boolean(),
|
15382
15407
|
providedExports: schemas_boolean(),
|
@@ -15506,7 +15531,7 @@ Help:
|
|
15506
15531
|
"externals"
|
15507
15532
|
]));
|
15508
15533
|
});
|
15509
|
-
}), ModuleFederationRuntimePlugin =
|
15534
|
+
}), ModuleFederationRuntimePlugin = (0, builtin_plugin_base.vt)(binding_.BuiltinPluginName.ModuleFederationRuntimePlugin, (options = {})=>options), parseOptions = (options, normalizeSimple, normalizeOptions)=>{
|
15510
15535
|
let items = [];
|
15511
15536
|
var options1 = options, normalizeSimple1 = normalizeSimple, normalizeOptions1 = normalizeOptions, fn = (key, value)=>{
|
15512
15537
|
items.push([
|
@@ -15526,7 +15551,7 @@ Help:
|
|
15526
15551
|
else throw Error("Unexpected options format");
|
15527
15552
|
return items;
|
15528
15553
|
}, compilerSet = new WeakSet();
|
15529
|
-
class ShareRuntimePlugin extends
|
15554
|
+
class ShareRuntimePlugin extends builtin_plugin_base.Xj {
|
15530
15555
|
enhanced;
|
15531
15556
|
name = binding_.BuiltinPluginName.ShareRuntimePlugin;
|
15532
15557
|
constructor(enhanced = !1){
|
@@ -15534,11 +15559,11 @@ Help:
|
|
15534
15559
|
}
|
15535
15560
|
raw(compiler) {
|
15536
15561
|
var compiler1, compiler2;
|
15537
|
-
if (compiler1 = compiler, !compilerSet.has(compiler1)) return compiler2 = compiler, compilerSet.add(compiler2),
|
15562
|
+
if (compiler1 = compiler, !compilerSet.has(compiler1)) return compiler2 = compiler, compilerSet.add(compiler2), (0, builtin_plugin_base.no)(this.name, this.enhanced);
|
15538
15563
|
}
|
15539
15564
|
}
|
15540
15565
|
let VERSION_PATTERN_REGEXP = /^([\d^=v<>~]|[*xX]$)/;
|
15541
|
-
class ConsumeSharedPlugin extends
|
15566
|
+
class ConsumeSharedPlugin extends builtin_plugin_base.Xj {
|
15542
15567
|
name = binding_.BuiltinPluginName.ConsumeSharedPlugin;
|
15543
15568
|
_options;
|
15544
15569
|
constructor(options){
|
@@ -15587,10 +15612,10 @@ Help:
|
|
15587
15612
|
})),
|
15588
15613
|
enhanced: this._options.enhanced
|
15589
15614
|
};
|
15590
|
-
return
|
15615
|
+
return (0, builtin_plugin_base.no)(this.name, rawOptions);
|
15591
15616
|
}
|
15592
15617
|
}
|
15593
|
-
class ProvideSharedPlugin extends
|
15618
|
+
class ProvideSharedPlugin extends builtin_plugin_base.Xj {
|
15594
15619
|
name = binding_.BuiltinPluginName.ProvideSharedPlugin;
|
15595
15620
|
_provides;
|
15596
15621
|
_enhanced;
|
@@ -15624,7 +15649,7 @@ Help:
|
|
15624
15649
|
key,
|
15625
15650
|
...v
|
15626
15651
|
}));
|
15627
|
-
return
|
15652
|
+
return (0, builtin_plugin_base.no)(this.name, rawOptions);
|
15628
15653
|
}
|
15629
15654
|
}
|
15630
15655
|
class SharePlugin {
|
@@ -15678,7 +15703,7 @@ Help:
|
|
15678
15703
|
}).apply(compiler);
|
15679
15704
|
}
|
15680
15705
|
}
|
15681
|
-
class ContainerPlugin extends
|
15706
|
+
class ContainerPlugin extends builtin_plugin_base.Xj {
|
15682
15707
|
name = binding_.BuiltinPluginName.ContainerPlugin;
|
15683
15708
|
_options;
|
15684
15709
|
constructor(options){
|
@@ -15720,10 +15745,10 @@ Help:
|
|
15720
15745
|
})),
|
15721
15746
|
enhanced
|
15722
15747
|
};
|
15723
|
-
return
|
15748
|
+
return (0, builtin_plugin_base.no)(this.name, rawOptions);
|
15724
15749
|
}
|
15725
15750
|
}
|
15726
|
-
class ContainerReferencePlugin extends
|
15751
|
+
class ContainerReferencePlugin extends builtin_plugin_base.Xj {
|
15727
15752
|
name = binding_.BuiltinPluginName.ContainerReferencePlugin;
|
15728
15753
|
_options;
|
15729
15754
|
constructor(options){
|
@@ -15758,7 +15783,7 @@ Help:
|
|
15758
15783
|
})),
|
15759
15784
|
enhanced: this._options.enhanced
|
15760
15785
|
};
|
15761
|
-
return
|
15786
|
+
return (0, builtin_plugin_base.no)(this.name, rawOptions);
|
15762
15787
|
}
|
15763
15788
|
}
|
15764
15789
|
async function minify(source, options) {
|
@@ -15769,7 +15794,7 @@ Help:
|
|
15769
15794
|
let _options = JSON.stringify(options || {});
|
15770
15795
|
return binding_default().transform(source, _options);
|
15771
15796
|
}
|
15772
|
-
let exports_rspackVersion = "1.5.
|
15797
|
+
let exports_rspackVersion = "1.5.2", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
|
15773
15798
|
getNormalizedRspackOptions: getNormalizedRspackOptions,
|
15774
15799
|
applyRspackOptionsDefaults: applyRspackOptionsDefaults,
|
15775
15800
|
getNormalizedWebpackOptions: getNormalizedRspackOptions,
|
@@ -15974,8 +15999,8 @@ Help:
|
|
15974
15999
|
...c.options.lazyCompilation
|
15975
16000
|
}, prefix = options.prefix || LAZY_COMPILATION_PREFIX;
|
15976
16001
|
options.prefix = `${prefix}__${i++}`;
|
15977
|
-
let activeModules = new Set()
|
15978
|
-
middlewareByCompiler.set(options.prefix, lazyCompilationMiddlewareInternal(compiler, activeModules,
|
16002
|
+
let activeModules = new Set();
|
16003
|
+
middlewareByCompiler.set(options.prefix, lazyCompilationMiddlewareInternal(compiler, activeModules, options.prefix)), applyPlugin(c, options, activeModules);
|
15979
16004
|
}
|
15980
16005
|
let keys = [
|
15981
16006
|
...middlewareByCompiler.keys()
|
@@ -15988,11 +16013,11 @@ Help:
|
|
15988
16013
|
};
|
15989
16014
|
}
|
15990
16015
|
if (compiler.options.experiments.lazyCompilation && (console.warn(DEPRECATED_LAZY_COMPILATION_OPTIONS_WARN), compiler.options.lazyCompilation && console.warn(REPEAT_LAZY_COMPILATION_OPTIONS_WARN)), !compiler.options.lazyCompilation && !compiler.options.experiments.lazyCompilation) return noop;
|
15991
|
-
let activeModules = new Set(),
|
16016
|
+
let activeModules = new Set(), options = {
|
15992
16017
|
...compiler.options.experiments.lazyCompilation,
|
15993
16018
|
...compiler.options.lazyCompilation
|
15994
16019
|
};
|
15995
|
-
return applyPlugin(compiler, options, activeModules
|
16020
|
+
return applyPlugin(compiler, options, activeModules), lazyCompilationMiddlewareInternal(compiler, activeModules, options.prefix || LAZY_COMPILATION_PREFIX);
|
15996
16021
|
},
|
15997
16022
|
swc: {
|
15998
16023
|
minify: minify,
|
@@ -16013,10 +16038,7 @@ Help:
|
|
16013
16038
|
sync: binding_.sync
|
16014
16039
|
},
|
16015
16040
|
CssChunkingPlugin: CssChunkingPlugin,
|
16016
|
-
createNativePlugin:
|
16017
|
-
if (INTERNAL_PLUGIN_NAMES.includes(name)) throw Error(`Cannot register native plugin with name '${name}', it conflicts with internal plugin names.`);
|
16018
|
-
return base_create(name, resolve, affectedHooks);
|
16019
|
-
},
|
16041
|
+
createNativePlugin: builtin_plugin_base.dE,
|
16020
16042
|
VirtualModulesPlugin: VirtualModulesPlugin
|
16021
16043
|
};
|
16022
16044
|
function createCompiler(userOptions) {
|
package/dist/schema/config.d.ts
CHANGED
@@ -363,6 +363,7 @@ export declare const getRspackOptionsSchema: () => z.ZodObject<{
|
|
363
363
|
css: z.ZodOptional<z.ZodBoolean>;
|
364
364
|
layers: z.ZodOptional<z.ZodBoolean>;
|
365
365
|
incremental: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"safe">]>, z.ZodLiteral<"advance">]>, z.ZodLiteral<"advance-silent">]>, z.ZodObject<{
|
366
|
+
silent: z.ZodOptional<z.ZodBoolean>;
|
366
367
|
make: z.ZodOptional<z.ZodBoolean>;
|
367
368
|
inferAsyncModules: z.ZodOptional<z.ZodBoolean>;
|
368
369
|
providedExports: z.ZodOptional<z.ZodBoolean>;
|
package/dist/schema/loaders.d.ts
CHANGED
@@ -116,6 +116,7 @@ export declare const getZodSwcLoaderOptionsSchema: () => z.ZodObject<{
|
|
116
116
|
"2022-03": "2022-03";
|
117
117
|
}>>;
|
118
118
|
treatConstEnumAsEnum: z.ZodOptional<z.ZodBoolean>;
|
119
|
+
tsEnumIsMutable: z.ZodOptional<z.ZodBoolean>;
|
119
120
|
useDefineForClassFields: z.ZodOptional<z.ZodBoolean>;
|
120
121
|
verbatimModuleSyntax: z.ZodOptional<z.ZodBoolean>;
|
121
122
|
}, z.core.$strict>>;
|
@@ -1,5 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
1
|
var urlBase = decodeURIComponent(__resourceQuery.slice(1));
|
4
2
|
|
5
3
|
/**
|
@@ -16,7 +14,7 @@ exports.activate = function (options) {
|
|
16
14
|
var request = (
|
17
15
|
urlBase.startsWith("https") ? require("https") : require("http")
|
18
16
|
).request(
|
19
|
-
urlBase + data,
|
17
|
+
urlBase + encodeURIComponent(data),
|
20
18
|
{
|
21
19
|
agent: false,
|
22
20
|
headers: { accept: "text/event-stream" }
|
@@ -1,5 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
1
|
if (typeof EventSource !== "function") {
|
4
2
|
throw new Error(
|
5
3
|
"Environment doesn't support lazy compilation (requires EventSource)"
|
@@ -16,7 +14,10 @@ var updateEventSource = function updateEventSource() {
|
|
16
14
|
if (activeEventSource) activeEventSource.close();
|
17
15
|
if (compiling.size) {
|
18
16
|
activeEventSource = new EventSource(
|
19
|
-
urlBase +
|
17
|
+
urlBase +
|
18
|
+
Array.from(compiling, function (module) {
|
19
|
+
return encodeURIComponent(module);
|
20
|
+
}).join("@")
|
20
21
|
);
|
21
22
|
/**
|
22
23
|
* @this {EventSource}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspack/core",
|
3
|
-
"version": "1.5.
|
3
|
+
"version": "1.5.2",
|
4
4
|
"webpackVersion": "5.75.0",
|
5
5
|
"license": "MIT",
|
6
6
|
"description": "The fast Rust-based web bundler with webpack-compatible API",
|
@@ -60,7 +60,7 @@
|
|
60
60
|
"dependencies": {
|
61
61
|
"@module-federation/runtime-tools": "0.18.0",
|
62
62
|
"@rspack/lite-tapable": "1.0.1",
|
63
|
-
"@rspack/binding": "1.5.
|
63
|
+
"@rspack/binding": "1.5.2"
|
64
64
|
},
|
65
65
|
"peerDependencies": {
|
66
66
|
"@swc/helpers": ">=0.5.1"
|