@rspack/core 1.0.9 → 1.0.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/dist/Dependency.d.ts +7 -6
- package/dist/Module.d.ts +19 -17
- package/dist/builtin-plugin/css-extract/utils.d.ts +1 -0
- package/dist/config/types.d.ts +545 -0
- package/dist/config/zod.d.ts +202 -1347
- package/dist/cssExtractHmr.js +224 -0
- package/dist/cssExtractLoader.js +277 -0
- package/dist/index.js +23347 -31
- package/dist/{builtin-plugin/css-extract/hmr/hotModuleReplacement.d.ts → runtime/cssExtractHmr.d.ts} +1 -0
- package/dist/runtime/moduleFederationDefaultRuntime.d.ts +2 -0
- package/dist/stats/statsFactoryUtils.d.ts +1 -0
- package/package.json +8 -5
- package/compiled/json-parse-even-better-errors/index.d.ts +0 -1
- package/compiled/json-parse-even-better-errors/index.js +0 -193
- package/compiled/json-parse-even-better-errors/package.json +0 -1
- package/compiled/neo-async/index.d.ts +0 -685
- package/compiled/neo-async/index.js +0 -9207
- package/compiled/neo-async/license +0 -22
- package/compiled/neo-async/package.json +0 -1
- package/compiled/zod-validation-error/index.d.ts +0 -41
- package/compiled/zod-validation-error/index.js +0 -335
- package/compiled/zod-validation-error/license +0 -9
- package/compiled/zod-validation-error/package.json +0 -1
- package/dist/Chunk.js +0 -118
- package/dist/ChunkGraph.js +0 -27
- package/dist/ChunkGroup.js +0 -76
- package/dist/Compilation.js +0 -854
- package/dist/Compiler.js +0 -920
- package/dist/ContextModuleFactory.js +0 -36
- package/dist/DependenciesBlock.js +0 -30
- package/dist/Dependency.js +0 -32
- package/dist/Entrypoint.js +0 -21
- package/dist/ErrorHelpers.js +0 -62
- package/dist/ExecuteModulePlugin.js +0 -46
- package/dist/FileSystem.js +0 -34
- package/dist/FileSystemInfo.js +0 -2
- package/dist/Module.js +0 -143
- package/dist/ModuleTypeConstants.js +0 -92
- package/dist/MultiCompiler.js +0 -440
- package/dist/MultiStats.js +0 -161
- package/dist/MultiWatching.js +0 -62
- package/dist/NormalModule.js +0 -97
- package/dist/NormalModuleFactory.js +0 -43
- package/dist/Resolver.js +0 -39
- package/dist/ResolverFactory.js +0 -61
- package/dist/RspackError.js +0 -21
- package/dist/RuleSetCompiler.js +0 -10
- package/dist/RuntimeGlobals.js +0 -357
- package/dist/RuntimeModule.js +0 -58
- package/dist/Stats.js +0 -161
- package/dist/Template.js +0 -206
- package/dist/Watching.js +0 -290
- package/dist/builtin-loader/index.js +0 -17
- package/dist/builtin-loader/lightningcss/index.js +0 -175
- package/dist/builtin-loader/swc/index.js +0 -5
- package/dist/builtin-loader/swc/pluginImport.js +0 -35
- package/dist/builtin-loader/swc/react.js +0 -7
- package/dist/builtin-loader/swc/types.js +0 -2
- package/dist/builtin-plugin/APIPlugin.js +0 -6
- package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.js +0 -6
- package/dist/builtin-plugin/AssetModulesPlugin.js +0 -6
- package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.js +0 -6
- package/dist/builtin-plugin/BannerPlugin.js +0 -22
- package/dist/builtin-plugin/BundlerInfoRspackPlugin.js +0 -12
- package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.js +0 -6
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.js +0 -6
- package/dist/builtin-plugin/ContextReplacementPlugin.js +0 -43
- package/dist/builtin-plugin/CopyRspackPlugin.js +0 -21
- package/dist/builtin-plugin/CssModulesPlugin.js +0 -6
- package/dist/builtin-plugin/DataUriPlugin.js +0 -6
- package/dist/builtin-plugin/DefinePlugin.js +0 -44
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.js +0 -6
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.js +0 -6
- package/dist/builtin-plugin/DynamicEntryPlugin.js +0 -36
- package/dist/builtin-plugin/ElectronTargetPlugin.js +0 -6
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.js +0 -6
- package/dist/builtin-plugin/EnableLibraryPlugin.js +0 -39
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.js +0 -6
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.js +0 -6
- package/dist/builtin-plugin/EntryPlugin.js +0 -34
- package/dist/builtin-plugin/EvalDevToolModulePlugin.js +0 -6
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.js +0 -16
- package/dist/builtin-plugin/ExternalsPlugin.js +0 -51
- package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.js +0 -6
- package/dist/builtin-plugin/FileUriPlugin.js +0 -6
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.js +0 -6
- package/dist/builtin-plugin/FlagDependencyUsagePlugin.js +0 -6
- package/dist/builtin-plugin/HotModuleReplacementPlugin.js +0 -18
- package/dist/builtin-plugin/HtmlRspackPlugin.js +0 -285
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.js +0 -11
- package/dist/builtin-plugin/IgnorePlugin.js +0 -20
- package/dist/builtin-plugin/InferAsyncModulesPlugin.js +0 -6
- package/dist/builtin-plugin/JavascriptModulesPlugin.js +0 -55
- package/dist/builtin-plugin/JsLoaderRspackPlugin.js +0 -9
- package/dist/builtin-plugin/JsonModulesPlugin.js +0 -6
- package/dist/builtin-plugin/LightningCssMiminizerRspackPlugin.js +0 -30
- package/dist/builtin-plugin/LimitChunkCountPlugin.js +0 -8
- package/dist/builtin-plugin/MangleExportsPlugin.js +0 -6
- package/dist/builtin-plugin/MergeDuplicateChunksPlugin.js +0 -6
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.js +0 -6
- package/dist/builtin-plugin/ModuleConcatenationPlugin.js +0 -6
- package/dist/builtin-plugin/NamedChunkIdsPlugin.js +0 -6
- package/dist/builtin-plugin/NamedModuleIdsPlugin.js +0 -6
- package/dist/builtin-plugin/NaturalChunkIdsPlugin.js +0 -6
- package/dist/builtin-plugin/NaturalModuleIdsPlugin.js +0 -6
- package/dist/builtin-plugin/NoEmitOnErrorsPlugin.js +0 -6
- package/dist/builtin-plugin/NodeTargetPlugin.js +0 -6
- package/dist/builtin-plugin/ProgressPlugin.js +0 -15
- package/dist/builtin-plugin/ProvidePlugin.js +0 -14
- package/dist/builtin-plugin/RealContentHashPlugin.js +0 -6
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.js +0 -6
- package/dist/builtin-plugin/RuntimeChunkPlugin.js +0 -6
- package/dist/builtin-plugin/RuntimePlugin.js +0 -6
- package/dist/builtin-plugin/SideEffectsFlagPlugin.js +0 -6
- package/dist/builtin-plugin/SizeLimitsPlugin.js +0 -9
- package/dist/builtin-plugin/SourceMapDevToolPlugin.js +0 -14
- package/dist/builtin-plugin/SplitChunksPlugin.js +0 -92
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.js +0 -80
- package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.js +0 -6
- package/dist/builtin-plugin/WebWorkerTemplatePlugin.js +0 -6
- package/dist/builtin-plugin/WorkerPlugin.js +0 -31
- package/dist/builtin-plugin/base.js +0 -58
- package/dist/builtin-plugin/css-extract/hmr/hotModuleReplacement.js +0 -182
- package/dist/builtin-plugin/css-extract/hmr/normalizeUrl.d.ts +0 -2
- package/dist/builtin-plugin/css-extract/hmr/normalizeUrl.js +0 -31
- package/dist/builtin-plugin/css-extract/index.js +0 -105
- package/dist/builtin-plugin/css-extract/loader.js +0 -204
- package/dist/builtin-plugin/css-extract/utils.js +0 -51
- package/dist/builtin-plugin/index.js +0 -84
- package/dist/builtin-plugin/lazy-compilation/backend.js +0 -139
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.js +0 -6
- package/dist/builtin-plugin/lazy-compilation/plugin.js +0 -60
- package/dist/config/adapter.js +0 -691
- package/dist/config/adapterRuleUse.js +0 -107
- package/dist/config/browserslistTargetHandler.js +0 -345
- package/dist/config/defaults.js +0 -876
- package/dist/config/index.js +0 -20
- package/dist/config/normalization.js +0 -299
- package/dist/config/target.js +0 -318
- package/dist/config/types.js +0 -3
- package/dist/config/zod.js +0 -1028
- package/dist/container/ContainerPlugin.js +0 -50
- package/dist/container/ContainerReferencePlugin.js +0 -49
- package/dist/container/ModuleFederationPlugin.js +0 -137
- package/dist/container/ModuleFederationPluginV1.js +0 -63
- package/dist/container/ModuleFederationRuntimePlugin.js +0 -6
- package/dist/container/options.js +0 -48
- package/dist/error/ConcurrentCompilationError.js +0 -20
- package/dist/exports.js +0 -183
- package/dist/lib/AbstractMethodError.js +0 -51
- package/dist/lib/Cache.js +0 -111
- package/dist/lib/CacheFacade.js +0 -321
- package/dist/lib/Dependency.js +0 -11
- package/dist/lib/EntryOptionPlugin.js +0 -89
- package/dist/lib/EnvironmentPlugin.js +0 -57
- package/dist/lib/HookWebpackError.js +0 -83
- package/dist/lib/IgnoreWarningsPlugin.js +0 -35
- package/dist/lib/LoaderOptionsPlugin.js +0 -74
- package/dist/lib/LoaderTargetPlugin.js +0 -37
- package/dist/lib/ModuleFilenameHelpers.js +0 -83
- package/dist/lib/NormalModuleReplacementPlugin.js +0 -85
- package/dist/lib/WebpackError.js +0 -20
- package/dist/lib/cache/MemoryCachePlugin.js +0 -40
- package/dist/lib/cache/getLazyHashedEtag.js +0 -73
- package/dist/lib/cache/mergeEtags.js +0 -74
- package/dist/lib/formatLocation.js +0 -64
- package/dist/loader-runner/LoaderLoadingError.js +0 -19
- package/dist/loader-runner/index.js +0 -735
- package/dist/loader-runner/loadLoader.js +0 -64
- package/dist/logging/Logger.js +0 -143
- package/dist/logging/createConsoleLogger.js +0 -176
- package/dist/logging/runtime.js +0 -37
- package/dist/logging/truncateArgs.js +0 -81
- package/dist/node/NodeEnvironmentPlugin.js +0 -50
- package/dist/node/NodeTemplatePlugin.js +0 -26
- package/dist/node/NodeWatchFileSystem.js +0 -144
- package/dist/node/nodeConsole.js +0 -146
- package/dist/rspack.js +0 -123
- package/dist/rspackOptionsApply.js +0 -274
- package/dist/sharing/ConsumeSharedPlugin.js +0 -69
- package/dist/sharing/ProvideSharedPlugin.js +0 -50
- package/dist/sharing/SharePlugin.js +0 -66
- package/dist/sharing/ShareRuntimePlugin.js +0 -26
- package/dist/sharing/utils.js +0 -8
- package/dist/stats/DefaultStatsFactoryPlugin.js +0 -1173
- package/dist/stats/DefaultStatsPresetPlugin.js +0 -305
- package/dist/stats/DefaultStatsPrinterPlugin.js +0 -1069
- package/dist/stats/StatsFactory.js +0 -167
- package/dist/stats/StatsPrinter.js +0 -142
- package/dist/stats/statsFactoryUtils.js +0 -341
- package/dist/util/ArrayQueue.js +0 -108
- package/dist/util/AssetInfo.js +0 -39
- package/dist/util/IterableHelpers.js +0 -35
- package/dist/util/MergeCaller.js +0 -24
- package/dist/util/SizeFormatHelpers.js +0 -24
- package/dist/util/SplitChunkSize.js +0 -18
- package/dist/util/assertNotNil.js +0 -9
- package/dist/util/assetCondition.js +0 -2
- package/dist/util/bindingVersionCheck.js +0 -124
- package/dist/util/cleverMerge.js +0 -504
- package/dist/util/comparators.js +0 -108
- package/dist/util/createHash.js +0 -161
- package/dist/util/createReadonlyMap.js +0 -29
- package/dist/util/fake.js +0 -28
- package/dist/util/fs.js +0 -120
- package/dist/util/hash/BatchedHash.js +0 -69
- package/dist/util/hash/index.js +0 -39
- package/dist/util/hash/md4.js +0 -27
- package/dist/util/hash/wasm-hash.js +0 -167
- package/dist/util/hash/xxhash64.js +0 -27
- package/dist/util/identifier.js +0 -330
- package/dist/util/index.js +0 -123
- package/dist/util/memoize.js +0 -61
- package/dist/util/scheme.js +0 -57
- package/dist/util/smartGrouping.js +0 -148
- package/dist/util/source.js +0 -42
- package/dist/util/validate.js +0 -77
- package/dist/util/webpack.js +0 -27
- /package/dist/{container/default.runtime.js → moduleFederationDefaultRuntime.js} +0 -0
package/dist/NormalModule.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.NormalModule = void 0;
|
|
30
|
-
const node_util_1 = __importDefault(require("node:util"));
|
|
31
|
-
const liteTapable = __importStar(require("@rspack/lite-tapable"));
|
|
32
|
-
const Compilation_1 = require("./Compilation");
|
|
33
|
-
const compilationHooksMap = new WeakMap();
|
|
34
|
-
const createFakeHook = (fakeHook, message, code) => {
|
|
35
|
-
return Object.freeze(Object.assign(message && code
|
|
36
|
-
? deprecateAllProperties(fakeHook, message, code)
|
|
37
|
-
: fakeHook, { _fakeHook: true }));
|
|
38
|
-
};
|
|
39
|
-
const deprecateAllProperties = (obj, message, code) => {
|
|
40
|
-
const newObj = {};
|
|
41
|
-
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
42
|
-
for (const name of Object.keys(descriptors)) {
|
|
43
|
-
const descriptor = descriptors[name];
|
|
44
|
-
if (typeof descriptor.value === "function") {
|
|
45
|
-
Object.defineProperty(newObj, name, {
|
|
46
|
-
...descriptor,
|
|
47
|
-
value: node_util_1.default.deprecate(descriptor.value, message, code)
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
else if (descriptor.get || descriptor.set) {
|
|
51
|
-
Object.defineProperty(newObj, name, {
|
|
52
|
-
...descriptor,
|
|
53
|
-
get: descriptor.get && node_util_1.default.deprecate(descriptor.get, message, code),
|
|
54
|
-
set: descriptor.set && node_util_1.default.deprecate(descriptor.set, message, code)
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
let value = descriptor.value;
|
|
59
|
-
Object.defineProperty(newObj, name, {
|
|
60
|
-
configurable: descriptor.configurable,
|
|
61
|
-
enumerable: descriptor.enumerable,
|
|
62
|
-
get: node_util_1.default.deprecate(() => value, message, code),
|
|
63
|
-
set: descriptor.writable
|
|
64
|
-
? node_util_1.default.deprecate((v) => (value = v), message, code)
|
|
65
|
-
: undefined
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
return newObj;
|
|
70
|
-
};
|
|
71
|
-
class NormalModule {
|
|
72
|
-
static getCompilationHooks(compilation) {
|
|
73
|
-
if (!(compilation instanceof Compilation_1.Compilation)) {
|
|
74
|
-
throw new TypeError("The 'compilation' argument must be an instance of Compilation");
|
|
75
|
-
}
|
|
76
|
-
let hooks = compilationHooksMap.get(compilation);
|
|
77
|
-
if (hooks === undefined) {
|
|
78
|
-
hooks = {
|
|
79
|
-
loader: new liteTapable.SyncHook(["loaderContext", "module"]),
|
|
80
|
-
// TODO webpack 6 deprecate
|
|
81
|
-
readResourceForScheme: new liteTapable.HookMap(scheme => {
|
|
82
|
-
const hook = hooks.readResource.for(scheme);
|
|
83
|
-
return createFakeHook({
|
|
84
|
-
tap: (options, fn) => hook.tap(options, (loaderContext) => fn(loaderContext.resource)),
|
|
85
|
-
tapAsync: (options, fn) => hook.tapAsync(options, (loaderContext, callback) => fn(loaderContext.resource, callback)),
|
|
86
|
-
tapPromise: (options, fn) => hook.tapPromise(options, (loaderContext) => fn(loaderContext.resource))
|
|
87
|
-
});
|
|
88
|
-
}),
|
|
89
|
-
readResource: new liteTapable.HookMap(() => new liteTapable.AsyncSeriesBailHook(["loaderContext"]))
|
|
90
|
-
};
|
|
91
|
-
compilationHooksMap.set(compilation, hooks);
|
|
92
|
-
}
|
|
93
|
-
return hooks;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
exports.NormalModule = NormalModule;
|
|
97
|
-
exports.default = NormalModule;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.NormalModuleFactory = void 0;
|
|
27
|
-
const liteTapable = __importStar(require("@rspack/lite-tapable"));
|
|
28
|
-
class NormalModuleFactory {
|
|
29
|
-
constructor() {
|
|
30
|
-
this.hooks = {
|
|
31
|
-
resolveForScheme: new liteTapable.HookMap(() => new liteTapable.AsyncSeriesBailHook(["resourceData"])),
|
|
32
|
-
beforeResolve: new liteTapable.AsyncSeriesBailHook(["resolveData"]),
|
|
33
|
-
factorize: new liteTapable.AsyncSeriesBailHook(["resolveData"]),
|
|
34
|
-
resolve: new liteTapable.AsyncSeriesBailHook(["resolveData"]),
|
|
35
|
-
afterResolve: new liteTapable.AsyncSeriesBailHook(["resolveData"]),
|
|
36
|
-
createModule: new liteTapable.AsyncSeriesBailHook([
|
|
37
|
-
"createData",
|
|
38
|
-
"resolveData"
|
|
39
|
-
])
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.NormalModuleFactory = NormalModuleFactory;
|
package/dist/Resolver.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Resolver = void 0;
|
|
4
|
-
const config_1 = require("./config");
|
|
5
|
-
function isString(value) {
|
|
6
|
-
return typeof value === "string";
|
|
7
|
-
}
|
|
8
|
-
class Resolver {
|
|
9
|
-
constructor(binding) {
|
|
10
|
-
this.binding = binding;
|
|
11
|
-
}
|
|
12
|
-
resolveSync(context, path, request) {
|
|
13
|
-
return this.binding.resolveSync(path, request);
|
|
14
|
-
}
|
|
15
|
-
resolve(context, path, request, resolveContext, callback) {
|
|
16
|
-
try {
|
|
17
|
-
const res = this.binding.resolveSync(path, request);
|
|
18
|
-
callback(null, res);
|
|
19
|
-
}
|
|
20
|
-
catch (err) {
|
|
21
|
-
callback(err);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
withOptions({ dependencyCategory, resolveToContext, ...resolve }) {
|
|
25
|
-
const rawResolve = (0, config_1.getRawResolve)(resolve);
|
|
26
|
-
// TODO: rspack_resolver is unimplemented regex
|
|
27
|
-
if (Array.isArray(rawResolve.restrictions)) {
|
|
28
|
-
rawResolve.restrictions =
|
|
29
|
-
rawResolve.restrictions.filter(isString);
|
|
30
|
-
}
|
|
31
|
-
const binding = this.binding.withOptions({
|
|
32
|
-
dependencyCategory,
|
|
33
|
-
resolveToContext,
|
|
34
|
-
...rawResolve
|
|
35
|
-
});
|
|
36
|
-
return new Resolver(binding);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.Resolver = Resolver;
|
package/dist/ResolverFactory.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
26
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
27
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
28
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
29
|
-
};
|
|
30
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
31
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
32
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
33
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
34
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
35
|
-
};
|
|
36
|
-
var _ResolverFactory_binding;
|
|
37
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.ResolverFactory = void 0;
|
|
39
|
-
const binding = __importStar(require("@rspack/binding"));
|
|
40
|
-
const Resolver_1 = require("./Resolver");
|
|
41
|
-
const config_1 = require("./config");
|
|
42
|
-
class ResolverFactory {
|
|
43
|
-
static __to_binding(resolver_factory) {
|
|
44
|
-
return __classPrivateFieldGet(resolver_factory, _ResolverFactory_binding, "f");
|
|
45
|
-
}
|
|
46
|
-
constructor() {
|
|
47
|
-
_ResolverFactory_binding.set(this, void 0);
|
|
48
|
-
__classPrivateFieldSet(this, _ResolverFactory_binding, new binding.JsResolverFactory(), "f");
|
|
49
|
-
}
|
|
50
|
-
get(type, resolveOptions) {
|
|
51
|
-
const { dependencyCategory, resolveToContext, ...resolve } = resolveOptions || {};
|
|
52
|
-
const binding = __classPrivateFieldGet(this, _ResolverFactory_binding, "f").get(type, {
|
|
53
|
-
...(0, config_1.getRawResolve)(resolve),
|
|
54
|
-
dependencyCategory,
|
|
55
|
-
resolveToContext
|
|
56
|
-
});
|
|
57
|
-
return new Resolver_1.Resolver(binding);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
exports.ResolverFactory = ResolverFactory;
|
|
61
|
-
_ResolverFactory_binding = new WeakMap();
|
package/dist/RspackError.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NonErrorEmittedError = exports.JsRspackDiagnostic = void 0;
|
|
4
|
-
const util_1 = require("./util");
|
|
5
|
-
class JsRspackDiagnostic {
|
|
6
|
-
static __to_binding(error, severity) {
|
|
7
|
-
return {
|
|
8
|
-
error: (0, util_1.concatErrorMsgAndStack)(error),
|
|
9
|
-
severity
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.JsRspackDiagnostic = JsRspackDiagnostic;
|
|
14
|
-
class NonErrorEmittedError extends Error {
|
|
15
|
-
constructor(error) {
|
|
16
|
-
super();
|
|
17
|
-
this.name = "NonErrorEmittedError";
|
|
18
|
-
this.message = `(Emitted value instead of an instance of Error) ${error}`;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.NonErrorEmittedError = NonErrorEmittedError;
|
package/dist/RuleSetCompiler.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RuleSetCompiler = void 0;
|
|
4
|
-
class RuleSetCompiler {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.references = new Map();
|
|
7
|
-
this.builtinReferences = new Map();
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
exports.RuleSetCompiler = RuleSetCompiler;
|
package/dist/RuntimeGlobals.js
DELETED
|
@@ -1,357 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* The following code is modified based on
|
|
4
|
-
* https://github.com/webpack/webpack/blob/v5.88.2/lib/RuntimeGlobals.js
|
|
5
|
-
*
|
|
6
|
-
* MIT Licensed
|
|
7
|
-
* Author Tobias Koppers \@sokra
|
|
8
|
-
* Copyright (c) JS Foundation and other contributors
|
|
9
|
-
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
10
|
-
*/
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.RuntimeGlobals = exports.__to_binding_runtime_globals = exports.__from_binding_runtime_globals = void 0;
|
|
13
|
-
const REVERSE_RUNTIME_GLOBALS = new Map();
|
|
14
|
-
function __from_binding_runtime_globals(runtimeRequirements) {
|
|
15
|
-
const res = new Set();
|
|
16
|
-
for (const flag of runtimeRequirements.value) {
|
|
17
|
-
if (flag in exports.RuntimeGlobals) {
|
|
18
|
-
res.add(exports.RuntimeGlobals[flag]);
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
res.add(flag);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return res;
|
|
25
|
-
}
|
|
26
|
-
exports.__from_binding_runtime_globals = __from_binding_runtime_globals;
|
|
27
|
-
function __to_binding_runtime_globals(runtimeRequirements) {
|
|
28
|
-
const res = {
|
|
29
|
-
value: []
|
|
30
|
-
};
|
|
31
|
-
for (const flag of Array.from(runtimeRequirements)) {
|
|
32
|
-
const item = REVERSE_RUNTIME_GLOBALS.get(flag);
|
|
33
|
-
if (typeof item === "string") {
|
|
34
|
-
res.value.push(item);
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
res.value.push(flag);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return res;
|
|
41
|
-
}
|
|
42
|
-
exports.__to_binding_runtime_globals = __to_binding_runtime_globals;
|
|
43
|
-
exports.RuntimeGlobals = {
|
|
44
|
-
/**
|
|
45
|
-
* the internal require function
|
|
46
|
-
*/
|
|
47
|
-
require: "__webpack_require__",
|
|
48
|
-
/**
|
|
49
|
-
* access to properties of the internal require function/object
|
|
50
|
-
*/
|
|
51
|
-
requireScope: "__webpack_require__.*",
|
|
52
|
-
/**
|
|
53
|
-
* the internal exports object
|
|
54
|
-
*/
|
|
55
|
-
exports: "__webpack_exports__",
|
|
56
|
-
/**
|
|
57
|
-
* top-level this need to be the exports object
|
|
58
|
-
*/
|
|
59
|
-
thisAsExports: "top-level-this-exports",
|
|
60
|
-
/**
|
|
61
|
-
* runtime need to return the exports of the last entry module
|
|
62
|
-
*/
|
|
63
|
-
returnExportsFromRuntime: "return-exports-from-runtime",
|
|
64
|
-
/**
|
|
65
|
-
* the internal module object
|
|
66
|
-
*/
|
|
67
|
-
module: "module",
|
|
68
|
-
/**
|
|
69
|
-
* the internal module object
|
|
70
|
-
*/
|
|
71
|
-
moduleId: "module.id",
|
|
72
|
-
/**
|
|
73
|
-
* the internal module object
|
|
74
|
-
*/
|
|
75
|
-
moduleLoaded: "module.loaded",
|
|
76
|
-
/**
|
|
77
|
-
* the bundle public path
|
|
78
|
-
*/
|
|
79
|
-
publicPath: "__webpack_require__.p",
|
|
80
|
-
/**
|
|
81
|
-
* the module id of the entry point
|
|
82
|
-
*/
|
|
83
|
-
entryModuleId: "__webpack_require__.s",
|
|
84
|
-
/**
|
|
85
|
-
* the module cache
|
|
86
|
-
*/
|
|
87
|
-
moduleCache: "__webpack_require__.c",
|
|
88
|
-
/**
|
|
89
|
-
* the module functions
|
|
90
|
-
*/
|
|
91
|
-
moduleFactories: "__webpack_require__.m",
|
|
92
|
-
/**
|
|
93
|
-
* the module functions, with only write access
|
|
94
|
-
*/
|
|
95
|
-
moduleFactoriesAddOnly: "__webpack_require__.m (add only)",
|
|
96
|
-
/**
|
|
97
|
-
* the chunk ensure function
|
|
98
|
-
*/
|
|
99
|
-
ensureChunk: "__webpack_require__.e",
|
|
100
|
-
/**
|
|
101
|
-
* an object with handlers to ensure a chunk
|
|
102
|
-
*/
|
|
103
|
-
ensureChunkHandlers: "__webpack_require__.f",
|
|
104
|
-
/**
|
|
105
|
-
* a runtime requirement if ensureChunkHandlers should include loading of chunk needed for entries
|
|
106
|
-
*/
|
|
107
|
-
ensureChunkIncludeEntries: "__webpack_require__.f (include entries)",
|
|
108
|
-
/**
|
|
109
|
-
* the chunk prefetch function
|
|
110
|
-
*/
|
|
111
|
-
prefetchChunk: "__webpack_require__.E",
|
|
112
|
-
/**
|
|
113
|
-
* an object with handlers to prefetch a chunk
|
|
114
|
-
*/
|
|
115
|
-
prefetchChunkHandlers: "__webpack_require__.F",
|
|
116
|
-
/**
|
|
117
|
-
* the chunk preload function
|
|
118
|
-
*/
|
|
119
|
-
preloadChunk: "__webpack_require__.G",
|
|
120
|
-
/**
|
|
121
|
-
* an object with handlers to preload a chunk
|
|
122
|
-
*/
|
|
123
|
-
preloadChunkHandlers: "__webpack_require__.H",
|
|
124
|
-
/**
|
|
125
|
-
* the exported property define getters function
|
|
126
|
-
*/
|
|
127
|
-
definePropertyGetters: "__webpack_require__.d",
|
|
128
|
-
/**
|
|
129
|
-
* define compatibility on export
|
|
130
|
-
*/
|
|
131
|
-
makeNamespaceObject: "__webpack_require__.r",
|
|
132
|
-
/**
|
|
133
|
-
* create a fake namespace object
|
|
134
|
-
*/
|
|
135
|
-
createFakeNamespaceObject: "__webpack_require__.t",
|
|
136
|
-
/**
|
|
137
|
-
* compatibility get default export
|
|
138
|
-
*/
|
|
139
|
-
compatGetDefaultExport: "__webpack_require__.n",
|
|
140
|
-
/**
|
|
141
|
-
* harmony module decorator
|
|
142
|
-
*/
|
|
143
|
-
harmonyModuleDecorator: "__webpack_require__.hmd",
|
|
144
|
-
/**
|
|
145
|
-
* node.js module decorator
|
|
146
|
-
*/
|
|
147
|
-
nodeModuleDecorator: "__webpack_require__.nmd",
|
|
148
|
-
/**
|
|
149
|
-
* the webpack hash
|
|
150
|
-
*/
|
|
151
|
-
getFullHash: "__webpack_require__.h",
|
|
152
|
-
/**
|
|
153
|
-
* an object containing all installed WebAssembly.Instance export objects keyed by module id
|
|
154
|
-
*/
|
|
155
|
-
wasmInstances: "__webpack_require__.w",
|
|
156
|
-
/**
|
|
157
|
-
* instantiate a wasm instance from module exports object, id, hash and importsObject
|
|
158
|
-
*/
|
|
159
|
-
instantiateWasm: "__webpack_require__.v",
|
|
160
|
-
/**
|
|
161
|
-
* the uncaught error handler for the webpack runtime
|
|
162
|
-
*/
|
|
163
|
-
uncaughtErrorHandler: "__webpack_require__.oe",
|
|
164
|
-
/**
|
|
165
|
-
* the script nonce
|
|
166
|
-
*/
|
|
167
|
-
scriptNonce: "__webpack_require__.nc",
|
|
168
|
-
/**
|
|
169
|
-
* function to load a script tag.
|
|
170
|
-
* Arguments: (url: string, done: (event) =\> void), key?: string | number, chunkId?: string | number) =\> void
|
|
171
|
-
* done function is called when loading has finished or timeout occurred.
|
|
172
|
-
* It will attach to existing script tags with data-webpack == uniqueName + ":" + key or src == url.
|
|
173
|
-
*/
|
|
174
|
-
loadScript: "__webpack_require__.l",
|
|
175
|
-
/**
|
|
176
|
-
* function to promote a string to a TrustedScript using webpack's Trusted
|
|
177
|
-
* Types policy
|
|
178
|
-
* Arguments: (script: string) =\> TrustedScript
|
|
179
|
-
*/
|
|
180
|
-
createScript: "__webpack_require__.ts",
|
|
181
|
-
/**
|
|
182
|
-
* function to promote a string to a TrustedScriptURL using webpack's Trusted
|
|
183
|
-
* Types policy
|
|
184
|
-
* Arguments: (url: string) =\> TrustedScriptURL
|
|
185
|
-
*/
|
|
186
|
-
createScriptUrl: "__webpack_require__.tu",
|
|
187
|
-
/**
|
|
188
|
-
* function to return webpack's Trusted Types policy
|
|
189
|
-
* Arguments: () =\> TrustedTypePolicy
|
|
190
|
-
*/
|
|
191
|
-
getTrustedTypesPolicy: "__webpack_require__.tt",
|
|
192
|
-
/**
|
|
193
|
-
* a flag when a chunk has a fetch priority
|
|
194
|
-
*/
|
|
195
|
-
hasFetchPriority: "has fetch priority",
|
|
196
|
-
/**
|
|
197
|
-
* the chunk name of the chunk with the runtime
|
|
198
|
-
*/
|
|
199
|
-
chunkName: "__webpack_require__.cn",
|
|
200
|
-
/**
|
|
201
|
-
* the runtime id of the current runtime
|
|
202
|
-
*/
|
|
203
|
-
runtimeId: "__webpack_require__.j",
|
|
204
|
-
/**
|
|
205
|
-
* the filename of the script part of the chunk
|
|
206
|
-
*/
|
|
207
|
-
getChunkScriptFilename: "__webpack_require__.u",
|
|
208
|
-
/**
|
|
209
|
-
* the filename of the css part of the chunk
|
|
210
|
-
*/
|
|
211
|
-
getChunkCssFilename: "__webpack_require__.k",
|
|
212
|
-
/**
|
|
213
|
-
* a flag when a module/chunk/tree has css modules
|
|
214
|
-
*/
|
|
215
|
-
hasCssModules: "has css modules",
|
|
216
|
-
/**
|
|
217
|
-
* the filename of the script part of the hot update chunk
|
|
218
|
-
*/
|
|
219
|
-
getChunkUpdateScriptFilename: "__webpack_require__.hu",
|
|
220
|
-
/**
|
|
221
|
-
* the filename of the css part of the hot update chunk
|
|
222
|
-
*/
|
|
223
|
-
getChunkUpdateCssFilename: "__webpack_require__.hk",
|
|
224
|
-
/**
|
|
225
|
-
* startup signal from runtime
|
|
226
|
-
* This will be called when the runtime chunk has been loaded.
|
|
227
|
-
*/
|
|
228
|
-
startup: "__webpack_require__.x",
|
|
229
|
-
/**
|
|
230
|
-
* @deprecated
|
|
231
|
-
* creating a default startup function with the entry modules
|
|
232
|
-
*/
|
|
233
|
-
startupNoDefault: "__webpack_require__.x (no default handler)",
|
|
234
|
-
/**
|
|
235
|
-
* startup signal from runtime but only used to add logic after the startup
|
|
236
|
-
*/
|
|
237
|
-
startupOnlyAfter: "__webpack_require__.x (only after)",
|
|
238
|
-
/**
|
|
239
|
-
* startup signal from runtime but only used to add sync logic before the startup
|
|
240
|
-
*/
|
|
241
|
-
startupOnlyBefore: "__webpack_require__.x (only before)",
|
|
242
|
-
/**
|
|
243
|
-
* global callback functions for installing chunks
|
|
244
|
-
*/
|
|
245
|
-
chunkCallback: "webpackChunk",
|
|
246
|
-
/**
|
|
247
|
-
* method to startup an entrypoint with needed chunks.
|
|
248
|
-
* Signature: (moduleId: Id, chunkIds: Id[]) =\> any.
|
|
249
|
-
* Returns the exports of the module or a Promise
|
|
250
|
-
*/
|
|
251
|
-
startupEntrypoint: "__webpack_require__.X",
|
|
252
|
-
/**
|
|
253
|
-
* register deferred code, which will run when certain
|
|
254
|
-
* chunks are loaded.
|
|
255
|
-
* Signature: (chunkIds: Id[], fn: () =\> any, priority: int \>= 0 = 0) =\> any
|
|
256
|
-
* Returned value will be returned directly when all chunks are already loaded
|
|
257
|
-
* When (priority & 1) it will wait for all other handlers with lower priority to
|
|
258
|
-
* be executed before itself is executed
|
|
259
|
-
*/
|
|
260
|
-
onChunksLoaded: "__webpack_require__.O",
|
|
261
|
-
/**
|
|
262
|
-
* method to install a chunk that was loaded somehow
|
|
263
|
-
* Signature: (\{ id, ids, modules, runtime \}) =\> void
|
|
264
|
-
*/
|
|
265
|
-
externalInstallChunk: "__webpack_require__.C",
|
|
266
|
-
/**
|
|
267
|
-
* interceptor for module executions
|
|
268
|
-
*/
|
|
269
|
-
interceptModuleExecution: "__webpack_require__.i",
|
|
270
|
-
/**
|
|
271
|
-
* the global object
|
|
272
|
-
*/
|
|
273
|
-
global: "__webpack_require__.g",
|
|
274
|
-
/**
|
|
275
|
-
* an object with all share scopes
|
|
276
|
-
*/
|
|
277
|
-
shareScopeMap: "__webpack_require__.S",
|
|
278
|
-
/**
|
|
279
|
-
* The sharing init sequence function (only runs once per share scope).
|
|
280
|
-
* Has one argument, the name of the share scope.
|
|
281
|
-
* Creates a share scope if not existing
|
|
282
|
-
*/
|
|
283
|
-
initializeSharing: "__webpack_require__.I",
|
|
284
|
-
/**
|
|
285
|
-
* The current scope when getting a module from a remote
|
|
286
|
-
*/
|
|
287
|
-
currentRemoteGetScope: "__webpack_require__.R",
|
|
288
|
-
/**
|
|
289
|
-
* the filename of the HMR manifest
|
|
290
|
-
*/
|
|
291
|
-
getUpdateManifestFilename: "__webpack_require__.hmrF",
|
|
292
|
-
/**
|
|
293
|
-
* function downloading the update manifest
|
|
294
|
-
*/
|
|
295
|
-
hmrDownloadManifest: "__webpack_require__.hmrM",
|
|
296
|
-
/**
|
|
297
|
-
* array with handler functions to download chunk updates
|
|
298
|
-
*/
|
|
299
|
-
hmrDownloadUpdateHandlers: "__webpack_require__.hmrC",
|
|
300
|
-
/**
|
|
301
|
-
* object with all hmr module data for all modules
|
|
302
|
-
*/
|
|
303
|
-
hmrModuleData: "__webpack_require__.hmrD",
|
|
304
|
-
/**
|
|
305
|
-
* array with handler functions when a module should be invalidated
|
|
306
|
-
*/
|
|
307
|
-
hmrInvalidateModuleHandlers: "__webpack_require__.hmrI",
|
|
308
|
-
/**
|
|
309
|
-
* the prefix for storing state of runtime modules when hmr is enabled
|
|
310
|
-
*/
|
|
311
|
-
hmrRuntimeStatePrefix: "__webpack_require__.hmrS",
|
|
312
|
-
/**
|
|
313
|
-
* the AMD define function
|
|
314
|
-
*/
|
|
315
|
-
amdDefine: "__webpack_require__.amdD",
|
|
316
|
-
/**
|
|
317
|
-
* the AMD options
|
|
318
|
-
*/
|
|
319
|
-
amdOptions: "__webpack_require__.amdO",
|
|
320
|
-
/**
|
|
321
|
-
* the System polyfill object
|
|
322
|
-
*/
|
|
323
|
-
system: "__webpack_require__.System",
|
|
324
|
-
/**
|
|
325
|
-
* the shorthand for Object.prototype.hasOwnProperty
|
|
326
|
-
* using of it decreases the compiled bundle size
|
|
327
|
-
*/
|
|
328
|
-
hasOwnProperty: "__webpack_require__.o",
|
|
329
|
-
/**
|
|
330
|
-
* the System.register context object
|
|
331
|
-
*/
|
|
332
|
-
systemContext: "__webpack_require__.y",
|
|
333
|
-
/**
|
|
334
|
-
* the baseURI of current document
|
|
335
|
-
*/
|
|
336
|
-
baseURI: "__webpack_require__.b",
|
|
337
|
-
/**
|
|
338
|
-
* a RelativeURL class when relative URLs are used
|
|
339
|
-
*/
|
|
340
|
-
relativeUrl: "__webpack_require__.U",
|
|
341
|
-
/**
|
|
342
|
-
* Creates an async module. The body function must be a async function.
|
|
343
|
-
* "module.exports" will be decorated with an AsyncModulePromise.
|
|
344
|
-
* The body function will be called.
|
|
345
|
-
* To handle async dependencies correctly do this: "([a, b, c] = await handleDependencies([a, b, c]));".
|
|
346
|
-
* If "hasAwaitAfterDependencies" is truthy, "handleDependencies()" must be called at the end of the body function.
|
|
347
|
-
* Signature: function(
|
|
348
|
-
* module: Module,
|
|
349
|
-
* body: (handleDependencies: (deps: AsyncModulePromise[]) =\> Promise\<any[]\> & () =\> void,
|
|
350
|
-
* hasAwaitAfterDependencies?: boolean
|
|
351
|
-
* ) =\> void
|
|
352
|
-
*/
|
|
353
|
-
asyncModule: "__webpack_require__.a"
|
|
354
|
-
};
|
|
355
|
-
for (const entry of Object.entries(exports.RuntimeGlobals)) {
|
|
356
|
-
REVERSE_RUNTIME_GLOBALS.set(entry[1], entry[0]);
|
|
357
|
-
}
|
package/dist/RuntimeModule.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RuntimeModule = exports.RuntimeModuleStage = void 0;
|
|
4
|
-
var RuntimeModuleStage;
|
|
5
|
-
(function (RuntimeModuleStage) {
|
|
6
|
-
RuntimeModuleStage[RuntimeModuleStage["NORMAL"] = 0] = "NORMAL";
|
|
7
|
-
RuntimeModuleStage[RuntimeModuleStage["BASIC"] = 5] = "BASIC";
|
|
8
|
-
RuntimeModuleStage[RuntimeModuleStage["ATTACH"] = 10] = "ATTACH";
|
|
9
|
-
RuntimeModuleStage[RuntimeModuleStage["TRIGGER"] = 20] = "TRIGGER";
|
|
10
|
-
})(RuntimeModuleStage = exports.RuntimeModuleStage || (exports.RuntimeModuleStage = {}));
|
|
11
|
-
class RuntimeModule {
|
|
12
|
-
static __to_binding(compilation, module) {
|
|
13
|
-
return {
|
|
14
|
-
name: module.name,
|
|
15
|
-
stage: module.stage,
|
|
16
|
-
generator: module.generate.bind(module),
|
|
17
|
-
cacheable: !(module.fullHash || module.dependentHash),
|
|
18
|
-
isolate: module.shouldIsolate()
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
constructor(name, stage = RuntimeModuleStage.NORMAL) {
|
|
22
|
-
this.fullHash = false;
|
|
23
|
-
this.dependentHash = false;
|
|
24
|
-
this.chunk = null;
|
|
25
|
-
this.compilation = null;
|
|
26
|
-
this.chunkGraph = null;
|
|
27
|
-
this._name = name;
|
|
28
|
-
this._stage = stage;
|
|
29
|
-
}
|
|
30
|
-
attach(compilation, chunk, chunkGraph) {
|
|
31
|
-
this.compilation = compilation;
|
|
32
|
-
this.chunk = chunk;
|
|
33
|
-
this.chunkGraph = chunkGraph;
|
|
34
|
-
}
|
|
35
|
-
get name() {
|
|
36
|
-
return this._name;
|
|
37
|
-
}
|
|
38
|
-
get stage() {
|
|
39
|
-
return this._stage;
|
|
40
|
-
}
|
|
41
|
-
identifier() {
|
|
42
|
-
return `webpack/runtime/${this._name}`;
|
|
43
|
-
}
|
|
44
|
-
readableIdentifier() {
|
|
45
|
-
return `webpack/runtime/${this._name}`;
|
|
46
|
-
}
|
|
47
|
-
shouldIsolate() {
|
|
48
|
-
return true;
|
|
49
|
-
}
|
|
50
|
-
generate() {
|
|
51
|
-
throw new Error(`Should implement "generate" method of runtime module "${this.name}"`);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
RuntimeModule.STAGE_NORMAL = RuntimeModuleStage.NORMAL;
|
|
55
|
-
RuntimeModule.STAGE_BASIC = RuntimeModuleStage.BASIC;
|
|
56
|
-
RuntimeModule.STAGE_ATTACH = RuntimeModuleStage.ATTACH;
|
|
57
|
-
RuntimeModule.STAGE_TRIGGER = RuntimeModuleStage.TRIGGER;
|
|
58
|
-
exports.RuntimeModule = RuntimeModule;
|