@ohos-ports/rspack-core 1.7.11-beta.1
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/LICENSE +22 -0
- package/README.md +15 -0
- package/compiled/@swc/types/index.d.ts +2134 -0
- package/compiled/@swc/types/index.js +19 -0
- package/compiled/@swc/types/license +201 -0
- package/compiled/@swc/types/package.json +1 -0
- package/compiled/browserslist-load-config/index.d.ts +21 -0
- package/compiled/browserslist-load-config/index.js +252 -0
- package/compiled/browserslist-load-config/license +21 -0
- package/compiled/browserslist-load-config/package.json +1 -0
- package/compiled/tinypool/LICENSE +24 -0
- package/compiled/tinypool/README.md +20 -0
- package/compiled/tinypool/dist/common-Qw-RoVFD.js +28 -0
- package/compiled/tinypool/dist/entry/process.d.ts +1 -0
- package/compiled/tinypool/dist/entry/process.js +72 -0
- package/compiled/tinypool/dist/entry/utils.d.ts +7 -0
- package/compiled/tinypool/dist/entry/utils.js +3 -0
- package/compiled/tinypool/dist/entry/worker.d.ts +1 -0
- package/compiled/tinypool/dist/entry/worker.js +76 -0
- package/compiled/tinypool/dist/index.d.ts +195 -0
- package/compiled/tinypool/dist/index.js +820 -0
- package/compiled/tinypool/dist/utils-B--2TaWv.js +38 -0
- package/compiled/tinypool/dist/utils-De75vAgL.js +10 -0
- package/compiled/tinypool/package.json +39 -0
- package/compiled/watchpack/index.d.ts +217 -0
- package/compiled/watchpack/index.js +3124 -0
- package/compiled/watchpack/license +20 -0
- package/compiled/watchpack/package.json +1 -0
- package/compiled/webpack-sources/index.js +4675 -0
- package/compiled/webpack-sources/license +21 -0
- package/compiled/webpack-sources/package.json +1 -0
- package/compiled/webpack-sources/types.d.ts +458 -0
- package/dist/BuildInfo.d.ts +17 -0
- package/dist/Chunk.d.ts +16 -0
- package/dist/ChunkGraph.d.ts +9 -0
- package/dist/Chunks.d.ts +12 -0
- package/dist/CodeGenerationResults.d.ts +1 -0
- package/dist/Compilation.d.ts +438 -0
- package/dist/Compiler.d.ts +226 -0
- package/dist/ConcatenatedModule.d.ts +1 -0
- package/dist/ContextModule.d.ts +1 -0
- package/dist/ContextModuleFactory.d.ts +13 -0
- package/dist/Diagnostics.d.ts +7 -0
- package/dist/Entrypoint.d.ts +2 -0
- package/dist/ErrorHelpers.d.ts +3 -0
- package/dist/ExecuteModulePlugin.d.ts +4 -0
- package/dist/ExportsInfo.d.ts +20 -0
- package/dist/ExternalModule.d.ts +1 -0
- package/dist/FileSystem.d.ts +54 -0
- package/dist/FileSystemInfo.d.ts +5 -0
- package/dist/Module.d.ts +42 -0
- package/dist/ModuleGraph.d.ts +19 -0
- package/dist/ModuleTypeConstants.d.ts +8 -0
- package/dist/MultiCompiler.d.ts +82 -0
- package/dist/MultiStats.d.ts +23 -0
- package/dist/MultiWatching.d.ts +27 -0
- package/dist/NativeWatchFileSystem.d.ts +23 -0
- package/dist/NormalModule.d.ts +15 -0
- package/dist/NormalModuleFactory.d.ts +23 -0
- package/dist/Resolver.d.ts +30 -0
- package/dist/ResolverFactory.d.ts +17 -0
- package/dist/RspackError.d.ts +12 -0
- package/dist/RuleSetCompiler.d.ts +9 -0
- package/dist/RuntimeGlobals.d.ts +356 -0
- package/dist/RuntimeModule.d.ts +34 -0
- package/dist/Stats.d.ts +17 -0
- package/dist/Template.d.ts +77 -0
- package/dist/VirtualModulesPlugin.d.ts +12 -0
- package/dist/Watching.d.ts +56 -0
- package/dist/builtin-loader/index.d.ts +1 -0
- package/dist/builtin-loader/lightningcss/index.d.ts +117 -0
- package/dist/builtin-loader/swc/collectTypeScriptInfo.d.ts +21 -0
- package/dist/builtin-loader/swc/index.d.ts +5 -0
- package/dist/builtin-loader/swc/pluginImport.d.ts +33 -0
- package/dist/builtin-loader/swc/types.d.ts +89 -0
- package/dist/builtin-plugin/APIPlugin.d.ts +9 -0
- package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +9 -0
- package/dist/builtin-plugin/AssetModulesPlugin.d.ts +9 -0
- package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +9 -0
- package/dist/builtin-plugin/BannerPlugin.d.ts +40 -0
- package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +14 -0
- package/dist/builtin-plugin/CaseSensitivePlugin.d.ts +9 -0
- package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +9 -0
- package/dist/builtin-plugin/CircularDependencyRspackPlugin.d.ts +54 -0
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +9 -0
- package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +9 -0
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +14 -0
- package/dist/builtin-plugin/CssChunkingPlugin.d.ts +21 -0
- package/dist/builtin-plugin/CssModulesPlugin.d.ts +9 -0
- package/dist/builtin-plugin/DataUriPlugin.d.ts +9 -0
- package/dist/builtin-plugin/DefinePlugin.d.ts +16 -0
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +7 -0
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +7 -0
- package/dist/builtin-plugin/DllEntryPlugin.d.ts +12 -0
- package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +11 -0
- package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +12 -0
- package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +9 -0
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +25 -0
- package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +11 -0
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +9 -0
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +9 -0
- package/dist/builtin-plugin/EntryPlugin.d.ts +32 -0
- package/dist/builtin-plugin/EsmLibraryPlugin.d.ts +11 -0
- package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +11 -0
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +10 -0
- package/dist/builtin-plugin/ExternalsPlugin.d.ts +12 -0
- package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +9 -0
- package/dist/builtin-plugin/FileUriPlugin.d.ts +9 -0
- package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +9 -0
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +9 -0
- package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +9 -0
- package/dist/builtin-plugin/HotModuleReplacementPlugin.d.ts +7 -0
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +9 -0
- package/dist/builtin-plugin/HttpUriPlugin.d.ts +36 -0
- package/dist/builtin-plugin/IgnorePlugin.d.ts +19 -0
- package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +9 -0
- package/dist/builtin-plugin/InlineExportsPlugin.d.ts +9 -0
- package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +15 -0
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +10 -0
- package/dist/builtin-plugin/JsonModulesPlugin.d.ts +9 -0
- package/dist/builtin-plugin/LibManifestPlugin.d.ts +17 -0
- package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +32 -0
- package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +14 -0
- package/dist/builtin-plugin/MangleExportsPlugin.d.ts +9 -0
- package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +9 -0
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +9 -0
- package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +7 -0
- package/dist/builtin-plugin/ModuleInfoHeaderPlugin.d.ts +9 -0
- package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +9 -0
- package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +9 -0
- package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +7 -0
- package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +7 -0
- package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +9 -0
- package/dist/builtin-plugin/NodeTargetPlugin.d.ts +9 -0
- package/dist/builtin-plugin/NormalModuleReplacementPlugin.d.ts +10 -0
- package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +10 -0
- package/dist/builtin-plugin/ProgressPlugin.d.ts +11 -0
- package/dist/builtin-plugin/ProvidePlugin.d.ts +10 -0
- package/dist/builtin-plugin/RealContentHashPlugin.d.ts +9 -0
- package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +9 -0
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +9 -0
- package/dist/builtin-plugin/RsdoctorPlugin.d.ts +49 -0
- package/dist/builtin-plugin/RslibPlugin.d.ts +11 -0
- package/dist/builtin-plugin/RstestPlugin.d.ts +11 -0
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +11 -0
- package/dist/builtin-plugin/RuntimePlugin.d.ts +29 -0
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +9 -0
- package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +19 -0
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +11 -0
- package/dist/builtin-plugin/SplitChunksPlugin.d.ts +11 -0
- package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +39 -0
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +215 -0
- package/dist/builtin-plugin/URLPlugin.d.ts +9 -0
- package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +7 -0
- package/dist/builtin-plugin/WorkerPlugin.d.ts +14 -0
- package/dist/builtin-plugin/base.d.ts +45 -0
- package/dist/builtin-plugin/css-extract/index.d.ts +24 -0
- package/dist/builtin-plugin/css-extract/loader.d.ts +21 -0
- package/dist/builtin-plugin/css-extract/utils.d.ts +6 -0
- package/dist/builtin-plugin/html-plugin/hooks.d.ts +32 -0
- package/dist/builtin-plugin/html-plugin/index.d.ts +2 -0
- package/dist/builtin-plugin/html-plugin/options.d.ts +82 -0
- package/dist/builtin-plugin/html-plugin/plugin.d.ts +24 -0
- package/dist/builtin-plugin/html-plugin/taps.d.ts +2 -0
- package/dist/builtin-plugin/index.d.ts +84 -0
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +10 -0
- package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +12 -0
- package/dist/config/adapter.d.ts +8 -0
- package/dist/config/adapterRuleUse.d.ts +391 -0
- package/dist/config/browserslistTargetHandler.d.ts +15 -0
- package/dist/config/defaults.d.ts +13 -0
- package/dist/config/devServer.d.ts +314 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/normalization.d.ts +174 -0
- package/dist/config/target.d.ts +93 -0
- package/dist/config/types.d.ts +2432 -0
- package/dist/container/ContainerPlugin.d.ts +41 -0
- package/dist/container/ContainerReferencePlugin.d.ts +34 -0
- package/dist/container/ModuleFederationManifestPlugin.d.ts +37 -0
- package/dist/container/ModuleFederationPlugin.d.ts +17 -0
- package/dist/container/ModuleFederationPluginV1.d.ts +22 -0
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +16 -0
- package/dist/container/index.d.ts +4 -0
- package/dist/container/options.d.ts +3 -0
- package/dist/cssExtractHmr.js +124 -0
- package/dist/cssExtractLoader.js +160 -0
- package/dist/error/ConcurrentCompilationError.d.ts +14 -0
- package/dist/exports.d.ts +178 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +12638 -0
- package/dist/lib/AbstractMethodError.d.ts +23 -0
- package/dist/lib/Cache.d.ts +65 -0
- package/dist/lib/CacheFacade.d.ts +139 -0
- package/dist/lib/DllPlugin.d.ts +42 -0
- package/dist/lib/DllReferencePlugin.d.ts +119 -0
- package/dist/lib/EntryOptionPlugin.d.ts +33 -0
- package/dist/lib/EnvironmentPlugin.d.ts +22 -0
- package/dist/lib/HookWebpackError.d.ts +40 -0
- package/dist/lib/IgnoreWarningsPlugin.d.ts +25 -0
- package/dist/lib/LoaderOptionsPlugin.d.ts +28 -0
- package/dist/lib/LoaderTargetPlugin.d.ts +24 -0
- package/dist/lib/ModuleFilenameHelpers.d.ts +53 -0
- package/dist/lib/WebpackError.d.ts +21 -0
- package/dist/lib/cache/MemoryCachePlugin.d.ts +5 -0
- package/dist/lib/cache/getLazyHashedEtag.d.ts +35 -0
- package/dist/lib/cache/mergeEtags.d.ts +17 -0
- package/dist/loader-runner/LoaderLoadingError.d.ts +13 -0
- package/dist/loader-runner/ModuleError.d.ts +13 -0
- package/dist/loader-runner/index.d.ts +36 -0
- package/dist/loader-runner/loadLoader.d.ts +12 -0
- package/dist/loader-runner/service.d.ts +73 -0
- package/dist/loader-runner/utils.d.ts +7 -0
- package/dist/loader-runner/worker.d.ts +14 -0
- package/dist/logging/Logger.d.ts +61 -0
- package/dist/logging/createConsoleLogger.d.ts +35 -0
- package/dist/logging/truncateArgs.d.ts +16 -0
- package/dist/moduleFederationDefaultRuntime.js +1 -0
- package/dist/node/NodeEnvironmentPlugin.d.ts +10 -0
- package/dist/node/NodeTemplatePlugin.d.ts +18 -0
- package/dist/node/NodeWatchFileSystem.d.ts +18 -0
- package/dist/node/nodeConsole.d.ts +15 -0
- package/dist/rspack.d.ts +25 -0
- package/dist/rspackOptionsApply.d.ts +4 -0
- package/dist/runtime/cssExtractHmr.d.ts +4 -0
- package/dist/runtime/moduleFederationDefaultRuntime.d.ts +2 -0
- package/dist/sharing/ConsumeSharedPlugin.d.ts +42 -0
- package/dist/sharing/ProvideSharedPlugin.d.ts +35 -0
- package/dist/sharing/SharePlugin.d.ts +53 -0
- package/dist/sharing/ShareRuntimePlugin.d.ts +9 -0
- package/dist/sharing/utils.d.ts +1 -0
- package/dist/stats/DefaultStatsFactoryPlugin.d.ts +20 -0
- package/dist/stats/DefaultStatsPresetPlugin.d.ts +4 -0
- package/dist/stats/DefaultStatsPrinterPlugin.d.ts +13 -0
- package/dist/stats/StatsFactory.d.ts +57 -0
- package/dist/stats/StatsPrinter.d.ts +57 -0
- package/dist/stats/statsFactoryUtils.d.ts +341 -0
- package/dist/swc.d.ts +7 -0
- package/dist/taps/compilation.d.ts +8 -0
- package/dist/taps/compiler.d.ts +2 -0
- package/dist/taps/contextModuleFactory.d.ts +2 -0
- package/dist/taps/index.d.ts +6 -0
- package/dist/taps/javascriptModules.d.ts +2 -0
- package/dist/taps/normalModuleFactory.d.ts +2 -0
- package/dist/taps/types.d.ts +11 -0
- package/dist/trace/index.d.ts +46 -0
- package/dist/trace/traceHookPlugin.d.ts +5 -0
- package/dist/util/ArrayQueue.d.ts +45 -0
- package/dist/util/AsyncTask.d.ts +7 -0
- package/dist/util/MergeCaller.d.ts +10 -0
- package/dist/util/SizeFormatHelpers.d.ts +10 -0
- package/dist/util/SplitChunkSize.d.ts +5 -0
- package/dist/util/assertNotNil.d.ts +1 -0
- package/dist/util/assetCondition.d.ts +2 -0
- package/dist/util/asyncLib.d.ts +54 -0
- package/dist/util/bindingVersionCheck.d.ts +5 -0
- package/dist/util/cleverMerge.d.ts +24 -0
- package/dist/util/comparators.d.ts +16 -0
- package/dist/util/createHash.d.ts +16 -0
- package/dist/util/createReadonlyMap.d.ts +1 -0
- package/dist/util/fake.d.ts +14 -0
- package/dist/util/fs.d.ts +375 -0
- package/dist/util/hash/index.d.ts +26 -0
- package/dist/util/hash/md4.d.ts +11 -0
- package/dist/util/hash/wasm-hash.d.ts +51 -0
- package/dist/util/hash/xxhash64.d.ts +11 -0
- package/dist/util/identifier.d.ts +31 -0
- package/dist/util/index.d.ts +9 -0
- package/dist/util/memoize.d.ts +2 -0
- package/dist/util/runtime.d.ts +2 -0
- package/dist/util/smartGrouping.d.ts +21 -0
- package/dist/util/source.d.ts +6 -0
- package/dist/util/validateConfig.d.ts +5 -0
- package/dist/worker.js +978 -0
- package/hot/dev-server.js +75 -0
- package/hot/emitter.js +21 -0
- package/hot/lazy-compilation-node.js +106 -0
- package/hot/lazy-compilation-web.js +98 -0
- package/hot/log-apply-result.js +49 -0
- package/hot/log.js +79 -0
- package/hot/only-dev-server.js +103 -0
- package/hot/poll.js +40 -0
- package/hot/signal.js +66 -0
- package/module.d.ts +273 -0
- package/package.json +79 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
|
|
2
|
+
import { RspackBuiltinPlugin } from '../builtin-plugin/base';
|
|
3
|
+
import type { Compiler } from '../Compiler';
|
|
4
|
+
import type { EntryRuntime, FilenameTemplate, LibraryOptions } from '../config';
|
|
5
|
+
import { type ShareScope } from '../sharing/SharePlugin';
|
|
6
|
+
export type ContainerPluginOptions = {
|
|
7
|
+
exposes: Exposes;
|
|
8
|
+
filename?: FilenameTemplate;
|
|
9
|
+
library?: LibraryOptions;
|
|
10
|
+
name: string;
|
|
11
|
+
runtime?: EntryRuntime;
|
|
12
|
+
shareScope?: ShareScope;
|
|
13
|
+
enhanced?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export type Exposes = (ExposesItem | ExposesObject)[] | ExposesObject;
|
|
16
|
+
export type ExposesItem = string;
|
|
17
|
+
export type ExposesItems = ExposesItem[];
|
|
18
|
+
export type ExposesObject = {
|
|
19
|
+
[k: string]: ExposesConfig | ExposesItem | ExposesItems;
|
|
20
|
+
};
|
|
21
|
+
export type ExposesConfig = {
|
|
22
|
+
import: ExposesItem | ExposesItems;
|
|
23
|
+
name?: string;
|
|
24
|
+
};
|
|
25
|
+
export declare class ContainerPlugin extends RspackBuiltinPlugin {
|
|
26
|
+
name: BuiltinPluginName;
|
|
27
|
+
_options: {
|
|
28
|
+
name: string;
|
|
29
|
+
shareScope: ShareScope;
|
|
30
|
+
library: LibraryOptions;
|
|
31
|
+
runtime: EntryRuntime | undefined;
|
|
32
|
+
filename: string | undefined;
|
|
33
|
+
exposes: [string, {
|
|
34
|
+
import: string[];
|
|
35
|
+
name: string | undefined;
|
|
36
|
+
}][];
|
|
37
|
+
enhanced: boolean;
|
|
38
|
+
};
|
|
39
|
+
constructor(options: ContainerPluginOptions);
|
|
40
|
+
raw(compiler: Compiler): BuiltinPlugin;
|
|
41
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
|
|
2
|
+
import { RspackBuiltinPlugin } from '../builtin-plugin/base';
|
|
3
|
+
import type { Compiler } from '../Compiler';
|
|
4
|
+
import type { ExternalsType } from '../config';
|
|
5
|
+
import { type ShareScope } from '../sharing/SharePlugin';
|
|
6
|
+
export type ContainerReferencePluginOptions = {
|
|
7
|
+
remoteType: ExternalsType;
|
|
8
|
+
remotes: Remotes;
|
|
9
|
+
shareScope?: ShareScope;
|
|
10
|
+
enhanced?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type Remotes = (RemotesItem | RemotesObject)[] | RemotesObject;
|
|
13
|
+
export type RemotesItem = string;
|
|
14
|
+
export type RemotesItems = RemotesItem[];
|
|
15
|
+
export type RemotesObject = {
|
|
16
|
+
[k: string]: RemotesConfig | RemotesItem | RemotesItems;
|
|
17
|
+
};
|
|
18
|
+
export type RemotesConfig = {
|
|
19
|
+
external: RemotesItem | RemotesItems;
|
|
20
|
+
shareScope?: ShareScope;
|
|
21
|
+
};
|
|
22
|
+
export declare class ContainerReferencePlugin extends RspackBuiltinPlugin {
|
|
23
|
+
name: BuiltinPluginName;
|
|
24
|
+
_options: {
|
|
25
|
+
remoteType: ExternalsType;
|
|
26
|
+
remotes: [string, {
|
|
27
|
+
external: string[];
|
|
28
|
+
shareScope: ShareScope;
|
|
29
|
+
}][];
|
|
30
|
+
enhanced: boolean;
|
|
31
|
+
};
|
|
32
|
+
constructor(options: ContainerReferencePluginOptions);
|
|
33
|
+
raw(compiler: Compiler): BuiltinPlugin;
|
|
34
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
|
|
2
|
+
import { RspackBuiltinPlugin } from '../builtin-plugin/base';
|
|
3
|
+
import type { Compiler } from '../Compiler';
|
|
4
|
+
export type RemoteAliasMap = Record<string, {
|
|
5
|
+
name: string;
|
|
6
|
+
entry?: string;
|
|
7
|
+
}>;
|
|
8
|
+
export type ManifestExposeOption = {
|
|
9
|
+
path: string;
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
export type ManifestSharedOption = {
|
|
13
|
+
name: string;
|
|
14
|
+
version?: string;
|
|
15
|
+
requiredVersion?: string;
|
|
16
|
+
singleton?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export type ModuleFederationManifestPluginOptions = {
|
|
19
|
+
name?: string;
|
|
20
|
+
globalName?: string;
|
|
21
|
+
filePath?: string;
|
|
22
|
+
disableAssetsAnalyze?: boolean;
|
|
23
|
+
fileName?: string;
|
|
24
|
+
remoteAliasMap?: RemoteAliasMap;
|
|
25
|
+
exposes?: ManifestExposeOption[];
|
|
26
|
+
shared?: ManifestSharedOption[];
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* JS-side post-processing plugin: reads mf-manifest.json and mf-stats.json, executes additionalData callback and merges/overwrites manifest.
|
|
30
|
+
* To avoid cross-NAPI callback complexity, this plugin runs at the afterProcessAssets stage to ensure Rust-side MfManifestPlugin has already output its artifacts.
|
|
31
|
+
*/
|
|
32
|
+
export declare class ModuleFederationManifestPlugin extends RspackBuiltinPlugin {
|
|
33
|
+
name: BuiltinPluginName;
|
|
34
|
+
private opts;
|
|
35
|
+
constructor(opts: ModuleFederationManifestPluginOptions);
|
|
36
|
+
raw(compiler: Compiler): BuiltinPlugin;
|
|
37
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Compiler } from '../Compiler';
|
|
2
|
+
import { type ModuleFederationManifestPluginOptions } from './ModuleFederationManifestPlugin';
|
|
3
|
+
import type { ModuleFederationPluginV1Options } from './ModuleFederationPluginV1';
|
|
4
|
+
import { type ModuleFederationRuntimeExperimentsOptions } from './ModuleFederationRuntimePlugin';
|
|
5
|
+
export interface ModuleFederationPluginOptions extends Omit<ModuleFederationPluginV1Options, 'enhanced'> {
|
|
6
|
+
runtimePlugins?: RuntimePlugins;
|
|
7
|
+
implementation?: string;
|
|
8
|
+
shareStrategy?: 'version-first' | 'loaded-first';
|
|
9
|
+
manifest?: boolean | Omit<ModuleFederationManifestPluginOptions, 'remoteAliasMap' | 'globalName' | 'name' | 'exposes' | 'shared'>;
|
|
10
|
+
experiments?: ModuleFederationRuntimeExperimentsOptions;
|
|
11
|
+
}
|
|
12
|
+
export type RuntimePlugins = string[] | [string, Record<string, unknown>][];
|
|
13
|
+
export declare class ModuleFederationPlugin {
|
|
14
|
+
private _options;
|
|
15
|
+
constructor(_options: ModuleFederationPluginOptions);
|
|
16
|
+
apply(compiler: Compiler): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Compiler } from '../Compiler';
|
|
2
|
+
import type { EntryRuntime, ExternalsType, LibraryOptions } from '../config';
|
|
3
|
+
import { type Shared, type ShareScope } from '../sharing/SharePlugin';
|
|
4
|
+
import { type Exposes } from './ContainerPlugin';
|
|
5
|
+
import { type Remotes } from './ContainerReferencePlugin';
|
|
6
|
+
export interface ModuleFederationPluginV1Options {
|
|
7
|
+
exposes?: Exposes;
|
|
8
|
+
filename?: string;
|
|
9
|
+
library?: LibraryOptions;
|
|
10
|
+
name: string;
|
|
11
|
+
remoteType?: ExternalsType;
|
|
12
|
+
remotes?: Remotes;
|
|
13
|
+
runtime?: EntryRuntime;
|
|
14
|
+
shareScope?: ShareScope;
|
|
15
|
+
shared?: Shared;
|
|
16
|
+
enhanced?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare class ModuleFederationPluginV1 {
|
|
19
|
+
private _options;
|
|
20
|
+
constructor(_options: ModuleFederationPluginV1Options);
|
|
21
|
+
apply(compiler: Compiler): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface ModuleFederationRuntimeExperimentsOptions {
|
|
2
|
+
asyncStartup?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export interface ModuleFederationRuntimeOptions {
|
|
5
|
+
entryRuntime?: string;
|
|
6
|
+
experiments?: ModuleFederationRuntimeExperimentsOptions;
|
|
7
|
+
}
|
|
8
|
+
export declare const ModuleFederationRuntimePlugin: {
|
|
9
|
+
new (options?: ModuleFederationRuntimeOptions | undefined): {
|
|
10
|
+
name: string;
|
|
11
|
+
_args: [options?: ModuleFederationRuntimeOptions | undefined];
|
|
12
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
13
|
+
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
14
|
+
apply(compiler: import("..").Compiler): void;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
type ContainerOptionsFormat<T> = (string | Record<string, string | string[] | T>)[] | Record<string, string | string[] | T>;
|
|
2
|
+
export declare const parseOptions: <T, R>(options: ContainerOptionsFormat<T>, normalizeSimple: (a: string | string[], b: string) => R, normalizeOptions: (a: T, b: string) => R) => [string, R][];
|
|
3
|
+
export {};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
4
|
+
for(var key in definition)__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key) && Object.defineProperty(exports1, key, {
|
|
5
|
+
enumerable: !0,
|
|
6
|
+
get: definition[key]
|
|
7
|
+
});
|
|
8
|
+
}, __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = (exports1)=>{
|
|
9
|
+
"u" > typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
10
|
+
value: 'Module'
|
|
11
|
+
}), Object.defineProperty(exports1, '__esModule', {
|
|
12
|
+
value: !0
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
var __webpack_exports__ = {};
|
|
16
|
+
function normalizeUrl(url) {
|
|
17
|
+
let urlString = url.trim();
|
|
18
|
+
if (/^data:/i.test(urlString)) return urlString;
|
|
19
|
+
let protocol = -1 !== urlString.indexOf('//') ? `${urlString.split('//')[0]}//` : '', components = urlString.replace(RegExp(protocol, 'i'), '').split('/'), host = components[0].toLowerCase().replace(/\.$/, '');
|
|
20
|
+
return components[0] = '', protocol + host + components.reduce((accumulator, item)=>{
|
|
21
|
+
switch(item){
|
|
22
|
+
case '..':
|
|
23
|
+
accumulator.pop();
|
|
24
|
+
break;
|
|
25
|
+
case '.':
|
|
26
|
+
break;
|
|
27
|
+
default:
|
|
28
|
+
accumulator.push(item);
|
|
29
|
+
}
|
|
30
|
+
return accumulator;
|
|
31
|
+
}, []).join('/');
|
|
32
|
+
}
|
|
33
|
+
__webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_exports__, {
|
|
34
|
+
cssReload: ()=>cssReload,
|
|
35
|
+
normalizeUrl: ()=>normalizeUrl
|
|
36
|
+
});
|
|
37
|
+
const srcByModuleId = Object.create(null), noDocument = "u" < typeof document, { forEach } = Array.prototype;
|
|
38
|
+
function noop() {}
|
|
39
|
+
function updateCss(el, url) {
|
|
40
|
+
let normalizedUrl;
|
|
41
|
+
if (url) normalizedUrl = url;
|
|
42
|
+
else {
|
|
43
|
+
let href = el.getAttribute('href');
|
|
44
|
+
if (!href) return;
|
|
45
|
+
normalizedUrl = href.split('?')[0];
|
|
46
|
+
}
|
|
47
|
+
if (!isUrlRequest(el.href) || !1 === el.isLoaded || !normalizedUrl || !(normalizedUrl.indexOf('.css') > -1)) return;
|
|
48
|
+
el.visited = !0;
|
|
49
|
+
let newEl = el.cloneNode();
|
|
50
|
+
newEl.isLoaded = !1, newEl.addEventListener('load', ()=>{
|
|
51
|
+
!newEl.isLoaded && (newEl.isLoaded = !0, el.parentNode && el.parentNode.removeChild(el));
|
|
52
|
+
}), newEl.addEventListener('error', ()=>{
|
|
53
|
+
!newEl.isLoaded && (newEl.isLoaded = !0, el.parentNode && el.parentNode.removeChild(el));
|
|
54
|
+
}), newEl.href = `${normalizedUrl}?${Date.now()}`;
|
|
55
|
+
let parent = el.parentNode;
|
|
56
|
+
parent && (el.nextSibling ? parent.insertBefore(newEl, el.nextSibling) : parent.appendChild(newEl));
|
|
57
|
+
}
|
|
58
|
+
function reloadAll() {
|
|
59
|
+
let elements = document.querySelectorAll('link');
|
|
60
|
+
forEach.call(elements, (el)=>{
|
|
61
|
+
!0 !== el.visited && updateCss(el);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function isUrlRequest(url) {
|
|
65
|
+
return !!/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(url);
|
|
66
|
+
}
|
|
67
|
+
function cssReload(moduleId, options) {
|
|
68
|
+
var fn;
|
|
69
|
+
let timeout;
|
|
70
|
+
if (noDocument) return console.log('[HMR] No `window.document` found, CSS HMR disabled'), noop;
|
|
71
|
+
let getScriptSrc = function(moduleId) {
|
|
72
|
+
let src = srcByModuleId[moduleId];
|
|
73
|
+
if (!src) {
|
|
74
|
+
if (document.currentScript) ({ src } = document.currentScript);
|
|
75
|
+
else {
|
|
76
|
+
let scripts = document.getElementsByTagName("script"), lastScriptTag = scripts[scripts.length - 1];
|
|
77
|
+
lastScriptTag && ({ src } = lastScriptTag);
|
|
78
|
+
}
|
|
79
|
+
srcByModuleId[moduleId] = src;
|
|
80
|
+
}
|
|
81
|
+
return (fileMap)=>{
|
|
82
|
+
if (!src) return null;
|
|
83
|
+
let splitResult = src.match(/([^\\/]+)\.js$/), filename = splitResult && splitResult[1];
|
|
84
|
+
return filename && fileMap ? fileMap.split(',').map((mapRule)=>{
|
|
85
|
+
let reg = RegExp(`${filename}\\.js$`, 'g');
|
|
86
|
+
return normalizeUrl(src.replace(reg, `${mapRule.replace(/{fileName}/g, filename)}.css`));
|
|
87
|
+
}) : [
|
|
88
|
+
src.replace('.js', '.css')
|
|
89
|
+
];
|
|
90
|
+
};
|
|
91
|
+
}(moduleId);
|
|
92
|
+
return fn = function() {
|
|
93
|
+
let src = getScriptSrc(options.filename), reloaded = function(src) {
|
|
94
|
+
if (!src) return !1;
|
|
95
|
+
let elements = document.querySelectorAll('link'), loaded = !1;
|
|
96
|
+
return forEach.call(elements, (el)=>{
|
|
97
|
+
var href;
|
|
98
|
+
let ret, normalizedHref;
|
|
99
|
+
if (!el.href) return;
|
|
100
|
+
let url = (href = el.href, ret = '', normalizedHref = normalizeUrl(href), src.some((url)=>{
|
|
101
|
+
normalizedHref.indexOf(src) > -1 && (ret = url);
|
|
102
|
+
}), ret);
|
|
103
|
+
!isUrlRequest(url) || !0 !== el.visited && url && (updateCss(el, url), loaded = !0);
|
|
104
|
+
}), loaded;
|
|
105
|
+
}(src);
|
|
106
|
+
if (options.locals) {
|
|
107
|
+
console.log('[HMR] Detected local CSS Modules. Reload all CSS'), reloadAll();
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
reloaded ? console.log('[HMR] CSS reload %s', src && src.join(' ')) : (console.log('[HMR] Reload all CSS'), reloadAll());
|
|
111
|
+
}, timeout = 0, function(...args) {
|
|
112
|
+
let self = this;
|
|
113
|
+
clearTimeout(timeout), timeout = setTimeout(function() {
|
|
114
|
+
return fn.apply(self, args);
|
|
115
|
+
}, 50);
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
for(var __rspack_i in exports.cssReload = __webpack_exports__.cssReload, exports.normalizeUrl = __webpack_exports__.normalizeUrl, __webpack_exports__)-1 === [
|
|
119
|
+
"cssReload",
|
|
120
|
+
"normalizeUrl"
|
|
121
|
+
].indexOf(__rspack_i) && (exports[__rspack_i] = __webpack_exports__[__rspack_i]);
|
|
122
|
+
Object.defineProperty(exports, '__esModule', {
|
|
123
|
+
value: !0
|
|
124
|
+
});
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
__webpack_require__.n = (module)=>{
|
|
4
|
+
var getter = module && module.__esModule ? ()=>module.default : ()=>module;
|
|
5
|
+
return __webpack_require__.d(getter, {
|
|
6
|
+
a: getter
|
|
7
|
+
}), getter;
|
|
8
|
+
}, __webpack_require__.d = (exports1, definition)=>{
|
|
9
|
+
for(var key in definition)__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key) && Object.defineProperty(exports1, key, {
|
|
10
|
+
enumerable: !0,
|
|
11
|
+
get: definition[key]
|
|
12
|
+
});
|
|
13
|
+
}, __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = (exports1)=>{
|
|
14
|
+
"u" > typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
15
|
+
value: 'Module'
|
|
16
|
+
}), Object.defineProperty(exports1, '__esModule', {
|
|
17
|
+
value: !0
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
var __webpack_exports__ = {};
|
|
21
|
+
__webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_exports__, {
|
|
22
|
+
hotLoader: ()=>hotLoader,
|
|
23
|
+
default: ()=>css_extract_loader,
|
|
24
|
+
ABSOLUTE_PUBLIC_PATH: ()=>ABSOLUTE_PUBLIC_PATH,
|
|
25
|
+
MODULE_TYPE: ()=>MODULE_TYPE,
|
|
26
|
+
AUTO_PUBLIC_PATH: ()=>AUTO_PUBLIC_PATH,
|
|
27
|
+
pitch: ()=>pitch,
|
|
28
|
+
SINGLE_DOT_PATH_SEGMENT: ()=>SINGLE_DOT_PATH_SEGMENT,
|
|
29
|
+
BASE_URI: ()=>BASE_URI
|
|
30
|
+
});
|
|
31
|
+
const external_node_path_namespaceObject = require("node:path");
|
|
32
|
+
var external_node_path_default = __webpack_require__.n(external_node_path_namespaceObject);
|
|
33
|
+
function isAbsolutePath(str) {
|
|
34
|
+
return external_node_path_default().posix.isAbsolute(str) || external_node_path_default().win32.isAbsolute(str);
|
|
35
|
+
}
|
|
36
|
+
const PLUGIN_NAME = 'css-extract-rspack-plugin', RELATIVE_PATH_REGEXP = /^\.\.?[/\\]/, BASE_URI = 'rspack-css-extract://', MODULE_TYPE = 'css/mini-extract', AUTO_PUBLIC_PATH = '__css_extract_public_path_auto__', ABSOLUTE_PUBLIC_PATH = `${BASE_URI}/css-extract-plugin/`, SINGLE_DOT_PATH_SEGMENT = '__css_extract_single_dot_path_segment__';
|
|
37
|
+
function hotLoader(content, context) {
|
|
38
|
+
let localsJsonString = JSON.stringify(JSON.stringify(context.locals));
|
|
39
|
+
return `${content}
|
|
40
|
+
if(module.hot) {
|
|
41
|
+
(function() {
|
|
42
|
+
var localsJsonString = ${localsJsonString};
|
|
43
|
+
// ${Date.now()}
|
|
44
|
+
var cssReload = require(${function(loaderContext, request) {
|
|
45
|
+
if (void 0 !== loaderContext.utils && 'function' == typeof loaderContext.utils.contextify) return JSON.stringify(loaderContext.utils.contextify(loaderContext.context || loaderContext.rootContext, request));
|
|
46
|
+
let splitted = request.split('!'), { context } = loaderContext;
|
|
47
|
+
return JSON.stringify(splitted.map((part)=>{
|
|
48
|
+
let splittedPart = part.match(/^(.*?)(\?.*)/), query = splittedPart ? splittedPart[2] : '', singlePath = splittedPart ? splittedPart[1] : part;
|
|
49
|
+
if (isAbsolutePath(singlePath) && context) {
|
|
50
|
+
var str;
|
|
51
|
+
if (isAbsolutePath(singlePath = external_node_path_default().relative(context, singlePath))) return singlePath + query;
|
|
52
|
+
str = singlePath, RELATIVE_PATH_REGEXP.test(str) || (singlePath = `./${singlePath}`);
|
|
53
|
+
}
|
|
54
|
+
return singlePath.replace(/\\/g, '/') + query;
|
|
55
|
+
}).join('!'));
|
|
56
|
+
}(context.loaderContext, external_node_path_default().join(__dirname, 'cssExtractHmr.js'))}).cssReload(module.id, ${JSON.stringify(context.options ?? {})});
|
|
57
|
+
// only invalidate when locals change
|
|
58
|
+
if (
|
|
59
|
+
module.hot.data &&
|
|
60
|
+
module.hot.data.value &&
|
|
61
|
+
module.hot.data.value !== localsJsonString
|
|
62
|
+
) {
|
|
63
|
+
module.hot.invalidate();
|
|
64
|
+
} else {
|
|
65
|
+
module.hot.accept();
|
|
66
|
+
}
|
|
67
|
+
module.hot.dispose(function(data) {
|
|
68
|
+
data.value = localsJsonString;
|
|
69
|
+
cssReload();
|
|
70
|
+
});
|
|
71
|
+
})();
|
|
72
|
+
}
|
|
73
|
+
`;
|
|
74
|
+
}
|
|
75
|
+
const pitch = function(request, _, data) {
|
|
76
|
+
let publicPathForExtract;
|
|
77
|
+
if (this._compiler?.options?.experiments?.css && this._module && ('css' === this._module.type || 'css/auto' === this._module.type || 'css/global' === this._module.type || 'css/module' === this._module.type)) {
|
|
78
|
+
let e = Error("use type 'css' and `CssExtractRspackPlugin` together, please set `experiments.css` to `false` or set `{ type: \"javascript/auto\" }` for rules with `CssExtractRspackPlugin` in your rspack config (now `CssExtractRspackPlugin` does nothing).");
|
|
79
|
+
e.stack = void 0, this.emitWarning(e);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
let options = this.getOptions(), emit = void 0 === options.emit || options.emit, callback = this.async(), filepath = this.resourcePath;
|
|
83
|
+
this.addDependency(filepath);
|
|
84
|
+
let { publicPath } = this._compilation.outputOptions;
|
|
85
|
+
'string' == typeof options.publicPath ? publicPath = options.publicPath : 'function' == typeof options.publicPath && (publicPath = options.publicPath(this.resourcePath, this.rootContext)), 'auto' === publicPath && (publicPath = AUTO_PUBLIC_PATH), publicPathForExtract = 'string' == typeof publicPath ? /^[a-zA-Z][a-zA-Z\d+\-.]*?:/.test(publicPath) ? publicPath : `${ABSOLUTE_PUBLIC_PATH}${publicPath.replace(/\./g, SINGLE_DOT_PATH_SEGMENT)}` : publicPath;
|
|
86
|
+
let handleExports = (originalExports)=>{
|
|
87
|
+
let locals, namedExport, esModule = void 0 === options.esModule || options.esModule, dependencies = [];
|
|
88
|
+
try {
|
|
89
|
+
let exports1 = originalExports.__esModule ? originalExports.default : originalExports;
|
|
90
|
+
if (namedExport = originalExports.__esModule && (!originalExports.default || !('locals' in originalExports.default))) for (let key of Object.keys(originalExports))'default' !== key && (locals || (locals = {}), locals[key] = originalExports[key]);
|
|
91
|
+
else locals = exports1?.locals;
|
|
92
|
+
if (Array.isArray(exports1) && emit) {
|
|
93
|
+
let identifierCountMap = new Map();
|
|
94
|
+
dependencies = exports1.map(([id, content, media, sourceMap, supports, layer])=>{
|
|
95
|
+
let context = this.rootContext, count = identifierCountMap.get(id) || 0;
|
|
96
|
+
return identifierCountMap.set(id, count + 1), {
|
|
97
|
+
identifier: id,
|
|
98
|
+
context,
|
|
99
|
+
content,
|
|
100
|
+
media,
|
|
101
|
+
supports,
|
|
102
|
+
layer,
|
|
103
|
+
identifierIndex: count,
|
|
104
|
+
sourceMap: sourceMap ? JSON.stringify(sourceMap) : void 0,
|
|
105
|
+
filepath
|
|
106
|
+
};
|
|
107
|
+
}).filter((item)=>null !== item);
|
|
108
|
+
}
|
|
109
|
+
} catch (e) {
|
|
110
|
+
callback(e);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
let result = function() {
|
|
114
|
+
if (locals) {
|
|
115
|
+
if (namedExport) {
|
|
116
|
+
let identifiers = Array.from(function*() {
|
|
117
|
+
let identifierId = 0;
|
|
118
|
+
for (let key of Object.keys(locals))identifierId += 1, yield [
|
|
119
|
+
`_${identifierId.toString(16)}`,
|
|
120
|
+
key
|
|
121
|
+
];
|
|
122
|
+
}()), localsString = identifiers.map(([id, key])=>{
|
|
123
|
+
var value;
|
|
124
|
+
return `\nvar ${id} = ${'function' == typeof (value = locals[key]) ? value.toString() : JSON.stringify(value)};`;
|
|
125
|
+
}).join(''), exportsString = `export { ${identifiers.map(([id, key])=>`${id} as ${JSON.stringify(key)}`).join(', ')} }`;
|
|
126
|
+
return void 0 !== options.defaultExport && options.defaultExport ? `${localsString}\n${exportsString}\nexport default { ${identifiers.map(([id, key])=>`${JSON.stringify(key)}: ${id}`).join(', ')} }\n` : `${localsString}\n${exportsString}\n`;
|
|
127
|
+
}
|
|
128
|
+
return `\n${esModule ? 'export default' : 'module.exports = '} ${JSON.stringify(locals)};`;
|
|
129
|
+
}
|
|
130
|
+
return esModule ? '\nexport {};' : '';
|
|
131
|
+
}(), resultSource = `// extracted by ${PLUGIN_NAME}`;
|
|
132
|
+
resultSource += this.hot && emit ? hotLoader(result, {
|
|
133
|
+
loaderContext: this,
|
|
134
|
+
options,
|
|
135
|
+
locals: locals
|
|
136
|
+
}) : result, dependencies.length > 0 && this.__internal__setParseMeta(PLUGIN_NAME, JSON.stringify(dependencies)), callback(null, resultSource, void 0, data);
|
|
137
|
+
};
|
|
138
|
+
this.importModule(`${this.resourcePath}.rspack[javascript/auto]!=!!!${request}`, {
|
|
139
|
+
layer: options.layer,
|
|
140
|
+
publicPath: publicPathForExtract,
|
|
141
|
+
baseUri: `${BASE_URI}/`
|
|
142
|
+
}, (error, exports1)=>{
|
|
143
|
+
error ? callback(error) : handleExports(exports1);
|
|
144
|
+
});
|
|
145
|
+
}, css_extract_loader = function(content) {
|
|
146
|
+
if (this._compiler?.options?.experiments?.css && this._module && ('css' === this._module.type || 'css/auto' === this._module.type || 'css/global' === this._module.type || 'css/module' === this._module.type)) return content;
|
|
147
|
+
};
|
|
148
|
+
for(var __rspack_i in exports.ABSOLUTE_PUBLIC_PATH = __webpack_exports__.ABSOLUTE_PUBLIC_PATH, exports.AUTO_PUBLIC_PATH = __webpack_exports__.AUTO_PUBLIC_PATH, exports.BASE_URI = __webpack_exports__.BASE_URI, exports.MODULE_TYPE = __webpack_exports__.MODULE_TYPE, exports.SINGLE_DOT_PATH_SEGMENT = __webpack_exports__.SINGLE_DOT_PATH_SEGMENT, exports.default = __webpack_exports__.default, exports.hotLoader = __webpack_exports__.hotLoader, exports.pitch = __webpack_exports__.pitch, __webpack_exports__)-1 === [
|
|
149
|
+
"ABSOLUTE_PUBLIC_PATH",
|
|
150
|
+
"AUTO_PUBLIC_PATH",
|
|
151
|
+
"BASE_URI",
|
|
152
|
+
"MODULE_TYPE",
|
|
153
|
+
"SINGLE_DOT_PATH_SEGMENT",
|
|
154
|
+
"default",
|
|
155
|
+
"hotLoader",
|
|
156
|
+
"pitch"
|
|
157
|
+
].indexOf(__rspack_i) && (exports[__rspack_i] = __webpack_exports__[__rspack_i]);
|
|
158
|
+
Object.defineProperty(exports, '__esModule', {
|
|
159
|
+
value: !0
|
|
160
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The following code is modified based on
|
|
3
|
+
* https://github.com/webpack/webpack/blob/4b4ca3b/lib/ConcurrentCompilationError.js
|
|
4
|
+
*
|
|
5
|
+
* MIT Licensed
|
|
6
|
+
* Author Maksim Nazarjev @acupofspirt
|
|
7
|
+
* Copyright (c) JS Foundation and other contributors
|
|
8
|
+
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
|
+
*/
|
|
10
|
+
export default class ConcurrentCompilationError extends Error {
|
|
11
|
+
name: string;
|
|
12
|
+
message: string;
|
|
13
|
+
constructor();
|
|
14
|
+
}
|