@ohos-ports/rspack-core 2.2.2-beta.0
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/@rspack/lite-tapable/dist/index.d.ts +176 -0
- package/compiled/@rspack/lite-tapable/license +22 -0
- package/compiled/@rspack/lite-tapable/package.json +1 -0
- package/compiled/@swc/types/index.d.ts +2284 -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/connect-next/index.d.ts +57 -0
- package/compiled/connect-next/license +26 -0
- package/compiled/connect-next/package.json +1 -0
- package/compiled/http-proxy-middleware/index.d.ts +455 -0
- package/compiled/http-proxy-middleware/license +22 -0
- package/compiled/http-proxy-middleware/package.json +1 -0
- package/compiled/open/index.d.ts +161 -0
- package/compiled/open/package.json +1 -0
- package/compiled/tinypool/LICENSE +24 -0
- package/compiled/tinypool/README.md +214 -0
- package/compiled/tinypool/dist/common-Bo3KCGim.js +31 -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 +199 -0
- package/compiled/tinypool/dist/index.js +784 -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 +55 -0
- package/compiled/watchpack/index.d.ts +3 -0
- package/compiled/watchpack/index.js +3811 -0
- package/compiled/watchpack/license +20 -0
- package/compiled/watchpack/package.json +8 -0
- package/compiled/watchpack/types/DirectoryWatcher.d.ts +335 -0
- package/compiled/watchpack/types/LinkResolver.d.ts +10 -0
- package/compiled/watchpack/types/getWatcherManager.d.ts +62 -0
- package/compiled/watchpack/types/index.d.ts +269 -0
- package/compiled/watchpack/types/reducePlan.d.ts +34 -0
- package/compiled/watchpack/types/util/globToRegExp.d.ts +2 -0
- package/compiled/watchpack/types/watchEventSource.d.ts +53 -0
- package/compiled/watchpack/types/watchpack.d.ts +2 -0
- package/compiled/webpack-sources/index.js +5835 -0
- package/compiled/webpack-sources/license +21 -0
- package/compiled/webpack-sources/package.json +1 -0
- package/compiled/webpack-sources/types.d.ts +500 -0
- package/dist/612~0.js +32 -0
- package/dist/612~3.js +32 -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 +448 -0
- package/dist/Compiler.d.ts +229 -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 +15 -0
- package/dist/FileSystem.d.ts +54 -0
- package/dist/FileSystemInfo.d.ts +5 -0
- package/dist/Module.d.ts +41 -0
- package/dist/ModuleGraph.d.ts +22 -0
- package/dist/ModuleGraphConnection.d.ts +10 -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 +52 -0
- package/dist/NormalModule.d.ts +14 -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 +360 -0
- package/dist/RuntimeModule.d.ts +34 -0
- package/dist/RuntimeTemplate.d.ts +151 -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/lightningcss/index.d.ts +114 -0
- package/dist/builtin-loader/lightningcss/target.d.ts +4 -0
- package/dist/builtin-loader/swc/collectTypeScriptInfo.d.ts +21 -0
- package/dist/builtin-loader/swc/index.d.ts +3 -0
- package/dist/builtin-loader/swc/pluginImport.d.ts +33 -0
- package/dist/builtin-loader/swc/types.d.ts +60 -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/CircularCheckRspackPlugin.d.ts +33 -0
- package/dist/builtin-plugin/CircularDependencyRspackPlugin.d.ts +60 -0
- package/dist/builtin-plugin/CircularModulesInfoPlugin.d.ts +7 -0
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +9 -0
- package/dist/builtin-plugin/CompactHashedChunkIdsPlugin.d.ts +12 -0
- package/dist/builtin-plugin/CompactHashedModuleIdsPlugin.d.ts +12 -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/CssHttpExternalsRspackPlugin.d.ts +9 -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 +18 -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 +16 -0
- package/dist/builtin-plugin/EsmNodeTargetPlugin.d.ts +9 -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 +13 -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/HashedModuleIdsPlugin.d.ts +10 -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 +30 -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 +28 -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 +12 -0
- package/dist/builtin-plugin/ProvidePlugin.d.ts +10 -0
- package/dist/builtin-plugin/RealContentHashPlugin.d.ts +20 -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 +46 -0
- package/dist/builtin-plugin/RslibPlugin.d.ts +10 -0
- package/dist/builtin-plugin/RstestPlugin.d.ts +10 -0
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +11 -0
- package/dist/builtin-plugin/RuntimePlugin.d.ts +25 -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 +12 -0
- package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +39 -0
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +216 -0
- package/dist/builtin-plugin/SyncModuleIdsPlugin.d.ts +16 -0
- package/dist/builtin-plugin/URLPlugin.d.ts +9 -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 +10 -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 +77 -0
- package/dist/builtin-plugin/html-plugin/plugin.d.ts +20 -0
- package/dist/builtin-plugin/html-plugin/taps.d.ts +2 -0
- package/dist/builtin-plugin/index.d.ts +92 -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/builtin-plugin/rsc/Coordinator.d.ts +8 -0
- package/dist/builtin-plugin/rsc/RscClientPlugin.d.ts +13 -0
- package/dist/builtin-plugin/rsc/RscServerPlugin.d.ts +47 -0
- package/dist/builtin-plugin/rsc/index.d.ts +24 -0
- package/dist/checkNodeVersion.d.ts +1 -0
- package/dist/config/adapter.d.ts +8 -0
- package/dist/config/adapterRuleUse.d.ts +424 -0
- package/dist/config/browserslistTargetHandler.d.ts +15 -0
- package/dist/config/defaults.d.ts +15 -0
- package/dist/config/devServer.d.ts +179 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/normalization.d.ts +156 -0
- package/dist/config/target.d.ts +100 -0
- package/dist/config/types.d.ts +2728 -0
- package/dist/container/ContainerPlugin.d.ts +41 -0
- package/dist/container/ContainerReferencePlugin.d.ts +34 -0
- package/dist/container/ModuleFederationManifestPlugin.d.ts +44 -0
- package/dist/container/ModuleFederationPlugin.d.ts +34 -0
- package/dist/container/ModuleFederationPluginV1.d.ts +22 -0
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +16 -0
- package/dist/container/options.d.ts +3 -0
- package/dist/cssExtractHmr.js +99 -0
- package/dist/cssExtractLoader.js +117 -0
- package/dist/error/ConcurrentCompilationError.d.ts +14 -0
- package/dist/exports.d.ts +192 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +14552 -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 +39 -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 +16 -0
- package/dist/loader-runner/LoaderLoadingError.d.ts +13 -0
- package/dist/loader-runner/ModuleError.d.ts +13 -0
- package/dist/loader-runner/cache.d.ts +18 -0
- package/dist/loader-runner/dependencies.d.ts +22 -0
- package/dist/loader-runner/index.d.ts +35 -0
- package/dist/loader-runner/loadLoader.d.ts +12 -0
- package/dist/loader-runner/service.d.ts +77 -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 +30 -0
- package/dist/node/nodeConsole.d.ts +15 -0
- package/dist/rspack.d.ts +24 -0
- package/dist/rspackOptionsApply.d.ts +4 -0
- package/dist/runtime/cssExtractHmr.d.ts +4 -0
- package/dist/runtime/moduleFederationDefaultRuntime.d.ts +1 -0
- package/dist/sharing/CollectSharedEntryPlugin.d.ts +22 -0
- package/dist/sharing/ConsumeSharedPlugin.d.ts +54 -0
- package/dist/sharing/IndependentSharedPlugin.d.ts +37 -0
- package/dist/sharing/ProvideSharedPlugin.d.ts +54 -0
- package/dist/sharing/SharePlugin.d.ts +89 -0
- package/dist/sharing/ShareRuntimePlugin.d.ts +9 -0
- package/dist/sharing/SharedContainerPlugin.d.ts +23 -0
- package/dist/sharing/SharedUsedExportsOptimizerPlugin.d.ts +14 -0
- package/dist/sharing/TreeShakingSharedPlugin.d.ts +19 -0
- package/dist/sharing/utils.d.ts +2 -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 +338 -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/externalModule.d.ts +2 -0
- package/dist/taps/index.d.ts +7 -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 +47 -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 +11 -0
- package/dist/util/fs.d.ts +376 -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 +57 -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/supportsColor.d.ts +6 -0
- package/dist/util/targetsVersion.d.ts +2 -0
- package/dist/util/validateConfig.d.ts +5 -0
- package/dist/web/JsonpTemplatePlugin.d.ts +13 -0
- package/dist/webworker/WebWorkerTemplatePlugin.d.ts +13 -0
- package/dist/worker.js +971 -0
- package/hot/dev-server.js +76 -0
- package/hot/emitter.js +23 -0
- package/hot/lazy-compilation-node.js +109 -0
- package/hot/lazy-compilation-web.js +97 -0
- package/hot/log-apply-result.js +52 -0
- package/hot/log.js +87 -0
- package/hot/only-dev-server.js +104 -0
- package/hot/poll.js +41 -0
- package/hot/signal.js +68 -0
- package/module.d.ts +310 -0
- package/package.json +79 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ResolveData } from '../Module.js';
|
|
2
|
+
export declare const NormalModuleReplacementPlugin: {
|
|
3
|
+
new (resourceRegExp: RegExp, newResource: string | ((data: ResolveData) => void)): {
|
|
4
|
+
name: string;
|
|
5
|
+
_args: [resourceRegExp: RegExp, newResource: string | ((data: ResolveData) => void)];
|
|
6
|
+
affectedHooks: keyof import("../index.js").CompilerHooks | undefined;
|
|
7
|
+
raw(compiler: import("../index.js").Compiler): import("@ohos-ports/rspack-binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("../index.js").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type RawOccurrenceChunkIdsPluginOptions } from '@ohos-ports/rspack-binding';
|
|
2
|
+
export declare const OccurrenceChunkIdsPlugin: {
|
|
3
|
+
new (options?: RawOccurrenceChunkIdsPluginOptions | undefined): {
|
|
4
|
+
name: string;
|
|
5
|
+
_args: [options?: RawOccurrenceChunkIdsPluginOptions | undefined];
|
|
6
|
+
affectedHooks: keyof import("../index.js").CompilerHooks | undefined;
|
|
7
|
+
raw(compiler: import("../index.js").Compiler): import("@ohos-ports/rspack-binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("../index.js").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type RawProgressPluginHandlerInfo, type RawProgressPluginOptions } from '@ohos-ports/rspack-binding';
|
|
2
|
+
export type ProgressPluginOptions = Partial<Omit<RawProgressPluginOptions, 'handler'>> | ((percentage: number, msg: string, info: RawProgressPluginHandlerInfo) => void) | undefined;
|
|
3
|
+
export type ProgressPluginHandlerInfo = RawProgressPluginHandlerInfo;
|
|
4
|
+
export declare const ProgressPlugin: {
|
|
5
|
+
new (progress?: ProgressPluginOptions): {
|
|
6
|
+
name: string;
|
|
7
|
+
_args: [progress?: ProgressPluginOptions];
|
|
8
|
+
affectedHooks: keyof import("../index.js").CompilerHooks | undefined;
|
|
9
|
+
raw(compiler: import("../index.js").Compiler): import("@ohos-ports/rspack-binding").BuiltinPlugin;
|
|
10
|
+
apply(compiler: import("../index.js").Compiler): void;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type ProvidePluginOptions = Record<string, string | string[]>;
|
|
2
|
+
export declare const ProvidePlugin: {
|
|
3
|
+
new (provide: ProvidePluginOptions): {
|
|
4
|
+
name: string;
|
|
5
|
+
_args: [provide: ProvidePluginOptions];
|
|
6
|
+
affectedHooks: keyof import("../index.js").CompilerHooks | undefined;
|
|
7
|
+
raw(compiler: import("../index.js").Compiler): import("@ohos-ports/rspack-binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("../index.js").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as liteTapable from '../../compiled/@rspack/lite-tapable/dist/index.js';
|
|
2
|
+
import { type Compilation } from '../Compilation.js';
|
|
3
|
+
import type { CreatePartialRegisters } from '../taps/types.js';
|
|
4
|
+
declare const RealContentHashPluginImpl: {
|
|
5
|
+
new (): {
|
|
6
|
+
name: string;
|
|
7
|
+
_args: [];
|
|
8
|
+
affectedHooks: keyof import("../index.js").CompilerHooks | undefined;
|
|
9
|
+
raw(compiler: import("../index.js").Compiler): import("@ohos-ports/rspack-binding").BuiltinPlugin;
|
|
10
|
+
apply(compiler: import("../index.js").Compiler): void;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export type RealContentHashPluginHooks = {
|
|
14
|
+
updateHash: liteTapable.SyncBailHook<[Buffer[], string], string | undefined>;
|
|
15
|
+
};
|
|
16
|
+
export declare const RealContentHashPlugin: typeof RealContentHashPluginImpl & {
|
|
17
|
+
getCompilationHooks: (compilation: Compilation) => RealContentHashPluginHooks;
|
|
18
|
+
};
|
|
19
|
+
export declare const createRealContentHashPluginHooksRegisters: CreatePartialRegisters<'RealContentHashPlugin'>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const RemoveDuplicateModulesPlugin: {
|
|
2
|
+
new (): {
|
|
3
|
+
name: string;
|
|
4
|
+
_args: [];
|
|
5
|
+
affectedHooks: keyof import("../index.js").CompilerHooks | undefined;
|
|
6
|
+
raw(compiler: import("../index.js").Compiler): import("@ohos-ports/rspack-binding").BuiltinPlugin;
|
|
7
|
+
apply(compiler: import("../index.js").Compiler): void;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const RemoveEmptyChunksPlugin: {
|
|
2
|
+
new (): {
|
|
3
|
+
name: string;
|
|
4
|
+
_args: [];
|
|
5
|
+
affectedHooks: keyof import("../index.js").CompilerHooks | undefined;
|
|
6
|
+
raw(compiler: import("../index.js").Compiler): import("@ohos-ports/rspack-binding").BuiltinPlugin;
|
|
7
|
+
apply(compiler: import("../index.js").Compiler): void;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type JsRsdoctorAsset, type JsRsdoctorAssetPatch, type JsRsdoctorChunk, type JsRsdoctorChunkAssets, type JsRsdoctorChunkGraph, type JsRsdoctorChunkModules, type JsRsdoctorConnectionsOnlyImport, type JsRsdoctorConnectionsOnlyImportConnection, type JsRsdoctorDependency, type JsRsdoctorEntrypoint, type JsRsdoctorEntrypointAssets, type JsRsdoctorExportInfo, type JsRsdoctorModule, type JsRsdoctorModuleGraph, type JsRsdoctorModuleGraphModule, type JsRsdoctorModuleIdsPatch, type JsRsdoctorModuleOriginalSource, type JsRsdoctorModuleSourcesPatch, type JsRsdoctorSideEffect, type JsRsdoctorSourcePosition, type JsRsdoctorSourceRange, type JsRsdoctorStatement, type JsRsdoctorVariable } from '@ohos-ports/rspack-binding';
|
|
2
|
+
import * as liteTapable from '../../compiled/@rspack/lite-tapable/dist/index.js';
|
|
3
|
+
import { type Compilation } from '../Compilation.js';
|
|
4
|
+
import type { Compiler } from '../Compiler.js';
|
|
5
|
+
import type { CreatePartialRegisters } from '../taps/types.js';
|
|
6
|
+
export declare namespace RsdoctorPluginData {
|
|
7
|
+
export type { JsRsdoctorAsset as RsdoctorAsset, JsRsdoctorChunkGraph as RsdoctorChunkGraph, JsRsdoctorModuleGraph as RsdoctorModuleGraph, JsRsdoctorChunk as RsdoctorChunk, JsRsdoctorModule as RsdoctorModule, JsRsdoctorSideEffect as RsdoctorSideEffect, JsRsdoctorExportInfo as RsdoctorExportInfo, JsRsdoctorVariable as RsdoctorVariable, JsRsdoctorConnectionsOnlyImport as RsdoctorConnectionsOnlyImport, JsRsdoctorConnectionsOnlyImportConnection as RsdoctorConnectionsOnlyImportConnection, JsRsdoctorDependency as RsdoctorDependency, JsRsdoctorEntrypoint as RsdoctorEntrypoint, JsRsdoctorStatement as RsdoctorStatement, JsRsdoctorSourceRange as RsdoctorSourceRange, JsRsdoctorSourcePosition as RsdoctorSourcePosition, JsRsdoctorModuleGraphModule as RsdoctorModuleGraphModule, JsRsdoctorModuleIdsPatch as RsdoctorModuleIdsPatch, JsRsdoctorModuleOriginalSource as RsdoctorModuleOriginalSource, JsRsdoctorAssetPatch as RsdoctorAssetPatch, JsRsdoctorChunkAssets as RsdoctorChunkAssets, JsRsdoctorEntrypointAssets as RsdoctorEntrypointAssets, JsRsdoctorChunkModules as RsdoctorChunkModules, JsRsdoctorModuleSourcesPatch as RsdoctorModuleSourcesPatch, };
|
|
8
|
+
}
|
|
9
|
+
export type RsdoctorPluginOptions = {
|
|
10
|
+
moduleGraphFeatures?: boolean | ('graph' | 'ids' | 'sources')[];
|
|
11
|
+
chunkGraphFeatures?: boolean | ('graph' | 'assets')[];
|
|
12
|
+
sourceMapFeatures?: {
|
|
13
|
+
module?: boolean;
|
|
14
|
+
cheap?: boolean;
|
|
15
|
+
};
|
|
16
|
+
exportUsageGraph?: boolean;
|
|
17
|
+
};
|
|
18
|
+
declare const RsdoctorPluginImpl: {
|
|
19
|
+
new (c?: RsdoctorPluginOptions | undefined): {
|
|
20
|
+
name: string;
|
|
21
|
+
_args: [c?: RsdoctorPluginOptions | undefined];
|
|
22
|
+
affectedHooks: keyof import("../index.js").CompilerHooks | undefined;
|
|
23
|
+
raw(compiler: Compiler): import("@ohos-ports/rspack-binding").BuiltinPlugin;
|
|
24
|
+
apply(compiler: Compiler): void;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export type RsdoctorPluginHooks = {
|
|
28
|
+
moduleGraph: liteTapable.AsyncSeriesBailHook<[
|
|
29
|
+
JsRsdoctorModuleGraph
|
|
30
|
+
], false | void>;
|
|
31
|
+
chunkGraph: liteTapable.AsyncSeriesBailHook<[
|
|
32
|
+
JsRsdoctorChunkGraph
|
|
33
|
+
], false | void>;
|
|
34
|
+
moduleIds: liteTapable.AsyncSeriesBailHook<[
|
|
35
|
+
JsRsdoctorModuleIdsPatch
|
|
36
|
+
], false | void>;
|
|
37
|
+
moduleSources: liteTapable.AsyncSeriesBailHook<[
|
|
38
|
+
JsRsdoctorModuleSourcesPatch
|
|
39
|
+
], false | void>;
|
|
40
|
+
assets: liteTapable.AsyncSeriesBailHook<[JsRsdoctorAssetPatch], false | void>;
|
|
41
|
+
};
|
|
42
|
+
declare const RsdoctorPlugin: typeof RsdoctorPluginImpl & {
|
|
43
|
+
getCompilationHooks: (compilation: Compilation) => RsdoctorPluginHooks;
|
|
44
|
+
};
|
|
45
|
+
export declare const createRsdoctorPluginHooksRegisters: CreatePartialRegisters<`RsdoctorPlugin`>;
|
|
46
|
+
export { RsdoctorPlugin };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type RawRslibPluginOptions } from '@ohos-ports/rspack-binding';
|
|
2
|
+
export declare const RslibPlugin: {
|
|
3
|
+
new (rslib: RawRslibPluginOptions): {
|
|
4
|
+
name: string;
|
|
5
|
+
_args: [rslib: RawRslibPluginOptions];
|
|
6
|
+
affectedHooks: keyof import("../index.js").CompilerHooks | undefined;
|
|
7
|
+
raw(compiler: import("../index.js").Compiler): import("@ohos-ports/rspack-binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("../index.js").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type RawRstestPluginOptions } from '@ohos-ports/rspack-binding';
|
|
2
|
+
export declare const RstestPlugin: {
|
|
3
|
+
new (rstest: RawRstestPluginOptions): {
|
|
4
|
+
name: string;
|
|
5
|
+
_args: [rstest: RawRstestPluginOptions];
|
|
6
|
+
affectedHooks: keyof import("../index.js").CompilerHooks | undefined;
|
|
7
|
+
raw(compiler: import("../index.js").Compiler): import("@ohos-ports/rspack-binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("../index.js").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type RawRuntimeChunkOptions } from '@ohos-ports/rspack-binding';
|
|
2
|
+
export type RuntimeChunkPluginOptions = RawRuntimeChunkOptions;
|
|
3
|
+
export declare const RuntimeChunkPlugin: {
|
|
4
|
+
new (options: RawRuntimeChunkOptions): {
|
|
5
|
+
name: string;
|
|
6
|
+
_args: [options: RawRuntimeChunkOptions];
|
|
7
|
+
affectedHooks: keyof import("../index.js").CompilerHooks | undefined;
|
|
8
|
+
raw(compiler: import("../index.js").Compiler): import("@ohos-ports/rspack-binding").BuiltinPlugin;
|
|
9
|
+
apply(compiler: import("../index.js").Compiler): void;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import binding from '@ohos-ports/rspack-binding';
|
|
2
|
+
import * as liteTapable from '../../compiled/@rspack/lite-tapable/dist/index.js';
|
|
3
|
+
import type { Chunk } from '../Chunk.js';
|
|
4
|
+
import { type Compilation } from '../Compilation.js';
|
|
5
|
+
import type { CreatePartialRegisters } from '../taps/types.js';
|
|
6
|
+
export declare const RuntimePluginImpl: {
|
|
7
|
+
new (): {
|
|
8
|
+
name: string;
|
|
9
|
+
_args: [];
|
|
10
|
+
affectedHooks: keyof import("../index.js").CompilerHooks | undefined;
|
|
11
|
+
raw(compiler: import("../index.js").Compiler): binding.BuiltinPlugin;
|
|
12
|
+
apply(compiler: import("../index.js").Compiler): void;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type RuntimePluginHooks = {
|
|
16
|
+
createScript: liteTapable.SyncWaterfallHook<[string, Chunk]>;
|
|
17
|
+
createLink: liteTapable.SyncWaterfallHook<[string, Chunk]>;
|
|
18
|
+
linkPreload: liteTapable.SyncWaterfallHook<[string, Chunk]>;
|
|
19
|
+
linkPrefetch: liteTapable.SyncWaterfallHook<[string, Chunk]>;
|
|
20
|
+
};
|
|
21
|
+
declare const RuntimePlugin: typeof RuntimePluginImpl & {
|
|
22
|
+
getCompilationHooks: (compilation: Compilation) => RuntimePluginHooks;
|
|
23
|
+
};
|
|
24
|
+
export declare const createRuntimePluginHooksRegisters: CreatePartialRegisters<`RuntimePlugin`>;
|
|
25
|
+
export { RuntimePlugin };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from '@ohos-ports/rspack-binding';
|
|
2
|
+
import { RspackBuiltinPlugin } from './base.js';
|
|
3
|
+
export declare class SideEffectsFlagPlugin extends RspackBuiltinPlugin {
|
|
4
|
+
private analyzeSideEffectsFree;
|
|
5
|
+
name: BuiltinPluginName;
|
|
6
|
+
affectedHooks: 'compilation';
|
|
7
|
+
constructor(analyzeSideEffectsFree?: boolean);
|
|
8
|
+
raw(): BuiltinPlugin;
|
|
9
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const SizeLimitsPlugin: {
|
|
2
|
+
new (options: {
|
|
3
|
+
assetFilter?: (assetFilename: string) => boolean;
|
|
4
|
+
hints?: false | 'warning' | 'error';
|
|
5
|
+
maxAssetSize?: number;
|
|
6
|
+
maxEntrypointSize?: number;
|
|
7
|
+
}): {
|
|
8
|
+
name: string;
|
|
9
|
+
_args: [options: {
|
|
10
|
+
assetFilter?: (assetFilename: string) => boolean;
|
|
11
|
+
hints?: false | 'warning' | 'error';
|
|
12
|
+
maxAssetSize?: number;
|
|
13
|
+
maxEntrypointSize?: number;
|
|
14
|
+
}];
|
|
15
|
+
affectedHooks: keyof import("../index.js").CompilerHooks | undefined;
|
|
16
|
+
raw(compiler: import("../index.js").Compiler): import("@ohos-ports/rspack-binding").BuiltinPlugin;
|
|
17
|
+
apply(compiler: import("../index.js").Compiler): void;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type SourceMapDevToolPluginOptions } from '@ohos-ports/rspack-binding';
|
|
2
|
+
export type { SourceMapDevToolPluginOptions };
|
|
3
|
+
export declare const SourceMapDevToolPlugin: {
|
|
4
|
+
new (options: SourceMapDevToolPluginOptions): {
|
|
5
|
+
name: string;
|
|
6
|
+
_args: [options: SourceMapDevToolPluginOptions];
|
|
7
|
+
affectedHooks: keyof import("../index.js").CompilerHooks | undefined;
|
|
8
|
+
raw(compiler: import("../index.js").Compiler): import("@ohos-ports/rspack-binding").BuiltinPlugin;
|
|
9
|
+
apply(compiler: import("../index.js").Compiler): void;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName, type RawSplitChunksOptions } from '@ohos-ports/rspack-binding';
|
|
2
|
+
import type { Compiler } from '../Compiler.js';
|
|
3
|
+
import type { OptimizationSplitChunksOptions } from '../config/index.js';
|
|
4
|
+
import { RspackBuiltinPlugin } from './base.js';
|
|
5
|
+
export declare class SplitChunksPlugin extends RspackBuiltinPlugin {
|
|
6
|
+
private options;
|
|
7
|
+
name: BuiltinPluginName;
|
|
8
|
+
affectedHooks: 'thisCompilation';
|
|
9
|
+
constructor(options: OptimizationSplitChunksOptions);
|
|
10
|
+
raw(compiler: Compiler): BuiltinPlugin;
|
|
11
|
+
}
|
|
12
|
+
export declare function toRawSplitChunksOptions(sc: false | OptimizationSplitChunksOptions, compiler: Compiler, enableNameBatch?: boolean): RawSplitChunksOptions | undefined;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type RawSubresourceIntegrityPluginOptions } from '@ohos-ports/rspack-binding';
|
|
2
|
+
import type { Compiler } from '../Compiler.js';
|
|
3
|
+
export type SubresourceIntegrityHashFunction = 'sha256' | 'sha384' | 'sha512';
|
|
4
|
+
export type SubresourceIntegrityPluginOptions = {
|
|
5
|
+
hashFuncNames?: [
|
|
6
|
+
SubresourceIntegrityHashFunction,
|
|
7
|
+
...SubresourceIntegrityHashFunction[]
|
|
8
|
+
];
|
|
9
|
+
htmlPlugin?: string | false;
|
|
10
|
+
enabled?: 'auto' | boolean;
|
|
11
|
+
};
|
|
12
|
+
export type NativeSubresourceIntegrityPluginOptions = Omit<RawSubresourceIntegrityPluginOptions, 'htmlPlugin'> & {
|
|
13
|
+
htmlPlugin: string | false;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Note: This is not a webpack public API, maybe removed in future.
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
declare const NativeSubresourceIntegrityPlugin: {
|
|
20
|
+
new (options: NativeSubresourceIntegrityPluginOptions): {
|
|
21
|
+
name: string;
|
|
22
|
+
_args: [options: NativeSubresourceIntegrityPluginOptions];
|
|
23
|
+
affectedHooks: keyof import("../index.js").CompilerHooks | undefined;
|
|
24
|
+
raw(compiler: Compiler): import("@ohos-ports/rspack-binding").BuiltinPlugin;
|
|
25
|
+
apply(compiler: Compiler): void;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export declare class SubresourceIntegrityPlugin extends NativeSubresourceIntegrityPlugin {
|
|
29
|
+
private integrities;
|
|
30
|
+
private options;
|
|
31
|
+
constructor(options?: SubresourceIntegrityPluginOptions);
|
|
32
|
+
private isEnabled;
|
|
33
|
+
private getIntegrityChecksumForAsset;
|
|
34
|
+
private handleHwpPluginArgs;
|
|
35
|
+
private handleHwpBodyTags;
|
|
36
|
+
private processTag;
|
|
37
|
+
apply(compiler: Compiler): void;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import type { Compiler } from '../Compiler.js';
|
|
2
|
+
import type { LiteralUnion } from '../config/index.js';
|
|
3
|
+
import type { AssetConditions } from '../util/assetCondition.js';
|
|
4
|
+
type ExtractCommentsCondition = boolean | RegExp;
|
|
5
|
+
type ExtractCommentsBanner = string | boolean;
|
|
6
|
+
type ExtractCommentsObject = {
|
|
7
|
+
condition?: ExtractCommentsCondition | undefined;
|
|
8
|
+
banner?: ExtractCommentsBanner | undefined;
|
|
9
|
+
};
|
|
10
|
+
type ExtractCommentsOptions = ExtractCommentsCondition | ExtractCommentsObject;
|
|
11
|
+
export type SwcJsMinimizerRspackPluginOptions = {
|
|
12
|
+
test?: AssetConditions;
|
|
13
|
+
exclude?: AssetConditions;
|
|
14
|
+
include?: AssetConditions;
|
|
15
|
+
extractComments?: ExtractCommentsOptions | undefined;
|
|
16
|
+
minimizerOptions?: {
|
|
17
|
+
minify?: boolean;
|
|
18
|
+
ecma?: TerserEcmaVersion;
|
|
19
|
+
compress?: TerserCompressOptions | boolean;
|
|
20
|
+
mangle?: TerserMangleOptions | boolean;
|
|
21
|
+
format?: JsFormatOptions & ToSnakeCaseProperties<JsFormatOptions>;
|
|
22
|
+
module?: boolean;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* @example ToSnakeCase<'indentLevel'> == 'indent_level'
|
|
27
|
+
*/
|
|
28
|
+
type ToSnakeCase<T extends string> = T extends `${infer A}${infer B}` ? `${A extends Lowercase<A> ? A : `_${Lowercase<A>}`}${ToSnakeCase<B>}` : T;
|
|
29
|
+
/**
|
|
30
|
+
* @example ToSnakeCaseProperties\<{indentLevel: 3\}\> == {indent_level: 3\}
|
|
31
|
+
*/
|
|
32
|
+
type ToSnakeCaseProperties<T> = {
|
|
33
|
+
[K in keyof T as K extends string ? ToSnakeCase<K> : K]: T[K];
|
|
34
|
+
};
|
|
35
|
+
export interface JsFormatOptions {
|
|
36
|
+
/**
|
|
37
|
+
* Currently noop.
|
|
38
|
+
* @default false
|
|
39
|
+
* @alias ascii_only
|
|
40
|
+
*/
|
|
41
|
+
asciiOnly?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Currently noop.
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
beautify?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Currently noop.
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
51
|
+
braces?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* - `false`: removes all comments
|
|
54
|
+
* - `'some'`: preserves some comments
|
|
55
|
+
* - `'all'`: preserves all comments
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
58
|
+
comments?: false | 'some' | 'all';
|
|
59
|
+
/**
|
|
60
|
+
* Currently noop.
|
|
61
|
+
* @default 5
|
|
62
|
+
*/
|
|
63
|
+
ecma?: TerserEcmaVersion;
|
|
64
|
+
/**
|
|
65
|
+
* Currently noop.
|
|
66
|
+
* @alias indent_level
|
|
67
|
+
*/
|
|
68
|
+
indentLevel?: number;
|
|
69
|
+
/**
|
|
70
|
+
* Currently noop.
|
|
71
|
+
* @alias indent_start
|
|
72
|
+
*/
|
|
73
|
+
indentStart?: number;
|
|
74
|
+
inlineScript?: number;
|
|
75
|
+
/**
|
|
76
|
+
* Currently noop.
|
|
77
|
+
* @alias keep_numbers
|
|
78
|
+
*/
|
|
79
|
+
keepNumbers?: number;
|
|
80
|
+
/**
|
|
81
|
+
* Currently noop.
|
|
82
|
+
* @alias keep_quoted_props
|
|
83
|
+
*/
|
|
84
|
+
keepQuotedProps?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Currently noop.
|
|
87
|
+
* @alias max_line_len
|
|
88
|
+
*/
|
|
89
|
+
maxLineLen?: number | false;
|
|
90
|
+
/**
|
|
91
|
+
* When passed it must be a string and it will be prepended to the output literally.
|
|
92
|
+
* The source map will adjust for this text. Can be used to insert a comment containing licensing information.
|
|
93
|
+
*/
|
|
94
|
+
preamble?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Currently noop.
|
|
97
|
+
* @alias quote_keys
|
|
98
|
+
*/
|
|
99
|
+
quoteKeys?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Currently noop.
|
|
102
|
+
* @alias quote_style
|
|
103
|
+
*/
|
|
104
|
+
quoteStyle?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Currently noop.
|
|
107
|
+
* @alias preserve_annotations
|
|
108
|
+
*/
|
|
109
|
+
preserveAnnotations?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Currently noop.
|
|
112
|
+
*/
|
|
113
|
+
safari10?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Currently noop.
|
|
116
|
+
*/
|
|
117
|
+
semicolons?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Currently noop.
|
|
120
|
+
*/
|
|
121
|
+
shebang?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Currently noop.
|
|
124
|
+
*/
|
|
125
|
+
webkit?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Currently noop.
|
|
128
|
+
* @alias wrap_iife
|
|
129
|
+
*/
|
|
130
|
+
wrapIife?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Currently noop.
|
|
133
|
+
* @alias wrap_func_args
|
|
134
|
+
*/
|
|
135
|
+
wrapFuncArgs?: boolean;
|
|
136
|
+
}
|
|
137
|
+
export type TerserEcmaVersion = LiteralUnion<5 | 2015 | 2016, number> | string;
|
|
138
|
+
export interface TerserCompressOptions {
|
|
139
|
+
arguments?: boolean;
|
|
140
|
+
arrows?: boolean;
|
|
141
|
+
booleans?: boolean;
|
|
142
|
+
booleans_as_integers?: boolean;
|
|
143
|
+
collapse_vars?: boolean;
|
|
144
|
+
comparisons?: boolean;
|
|
145
|
+
computed_props?: boolean;
|
|
146
|
+
conditionals?: boolean;
|
|
147
|
+
dead_code?: boolean;
|
|
148
|
+
defaults?: boolean;
|
|
149
|
+
directives?: boolean;
|
|
150
|
+
drop_console?: boolean;
|
|
151
|
+
drop_debugger?: boolean;
|
|
152
|
+
ecma?: TerserEcmaVersion;
|
|
153
|
+
evaluate?: boolean;
|
|
154
|
+
expression?: boolean;
|
|
155
|
+
global_defs?: any;
|
|
156
|
+
hoist_funs?: boolean;
|
|
157
|
+
hoist_props?: boolean;
|
|
158
|
+
hoist_vars?: boolean;
|
|
159
|
+
ie8?: boolean;
|
|
160
|
+
if_return?: boolean;
|
|
161
|
+
inline?: 0 | 1 | 2 | 3;
|
|
162
|
+
join_vars?: boolean;
|
|
163
|
+
keep_classnames?: boolean;
|
|
164
|
+
keep_fargs?: boolean;
|
|
165
|
+
keep_fnames?: boolean;
|
|
166
|
+
keep_infinity?: boolean;
|
|
167
|
+
loops?: boolean;
|
|
168
|
+
negate_iife?: boolean;
|
|
169
|
+
passes?: number;
|
|
170
|
+
properties?: boolean;
|
|
171
|
+
pure_getters?: any;
|
|
172
|
+
pure_funcs?: string[];
|
|
173
|
+
reduce_funcs?: boolean;
|
|
174
|
+
reduce_vars?: boolean;
|
|
175
|
+
sequences?: any;
|
|
176
|
+
side_effects?: boolean;
|
|
177
|
+
switches?: boolean;
|
|
178
|
+
top_retain?: any;
|
|
179
|
+
toplevel?: any;
|
|
180
|
+
typeofs?: boolean;
|
|
181
|
+
unsafe?: boolean;
|
|
182
|
+
unsafe_passes?: boolean;
|
|
183
|
+
unsafe_arrows?: boolean;
|
|
184
|
+
unsafe_comps?: boolean;
|
|
185
|
+
unsafe_Function?: boolean;
|
|
186
|
+
unsafe_math?: boolean;
|
|
187
|
+
unsafe_symbols?: boolean;
|
|
188
|
+
unsafe_methods?: boolean;
|
|
189
|
+
unsafe_proto?: boolean;
|
|
190
|
+
unsafe_regexp?: boolean;
|
|
191
|
+
unsafe_undefined?: boolean;
|
|
192
|
+
unused?: boolean;
|
|
193
|
+
const_to_let?: boolean;
|
|
194
|
+
module?: boolean;
|
|
195
|
+
}
|
|
196
|
+
export interface TerserMangleOptions {
|
|
197
|
+
props?: TerserManglePropertiesOptions;
|
|
198
|
+
toplevel?: boolean;
|
|
199
|
+
keep_classnames?: boolean;
|
|
200
|
+
keep_fnames?: boolean;
|
|
201
|
+
keep_private_props?: boolean;
|
|
202
|
+
ie8?: boolean;
|
|
203
|
+
safari10?: boolean;
|
|
204
|
+
reserved?: string[];
|
|
205
|
+
}
|
|
206
|
+
export type TerserManglePropertiesOptions = {};
|
|
207
|
+
export declare const SwcJsMinimizerRspackPlugin: {
|
|
208
|
+
new (options?: SwcJsMinimizerRspackPluginOptions | undefined): {
|
|
209
|
+
name: string;
|
|
210
|
+
_args: [options?: SwcJsMinimizerRspackPluginOptions | undefined];
|
|
211
|
+
affectedHooks: keyof import("../index.js").CompilerHooks | undefined;
|
|
212
|
+
raw(compiler: Compiler): import("@ohos-ports/rspack-binding").BuiltinPlugin;
|
|
213
|
+
apply(compiler: Compiler): void;
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from '@ohos-ports/rspack-binding';
|
|
2
|
+
import type { Module } from '../Module.js';
|
|
3
|
+
import { RspackBuiltinPlugin } from './base.js';
|
|
4
|
+
export interface SyncModuleIdsPluginOptions {
|
|
5
|
+
path: string;
|
|
6
|
+
context?: string;
|
|
7
|
+
test?: (module: Module) => boolean;
|
|
8
|
+
mode?: 'read' | 'create' | 'merge' | 'update';
|
|
9
|
+
}
|
|
10
|
+
export declare class SyncModuleIdsPlugin extends RspackBuiltinPlugin {
|
|
11
|
+
private options;
|
|
12
|
+
name: BuiltinPluginName;
|
|
13
|
+
affectedHooks: 'compilation';
|
|
14
|
+
constructor(options: SyncModuleIdsPluginOptions);
|
|
15
|
+
raw(): BuiltinPlugin;
|
|
16
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const URLPlugin: {
|
|
2
|
+
new (): {
|
|
3
|
+
name: string;
|
|
4
|
+
_args: [];
|
|
5
|
+
affectedHooks: keyof import("../index.js").CompilerHooks | undefined;
|
|
6
|
+
raw(compiler: import("../index.js").Compiler): import("@ohos-ports/rspack-binding").BuiltinPlugin;
|
|
7
|
+
apply(compiler: import("../index.js").Compiler): void;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from '@ohos-ports/rspack-binding';
|
|
2
|
+
import type { Compiler } from '../Compiler.js';
|
|
3
|
+
import type { ChunkLoading, OutputModule, WasmLoading, WorkerPublicPath } from '../config/index.js';
|
|
4
|
+
import { RspackBuiltinPlugin } from './base.js';
|
|
5
|
+
export declare class WorkerPlugin extends RspackBuiltinPlugin {
|
|
6
|
+
private chunkLoading;
|
|
7
|
+
private wasmLoading;
|
|
8
|
+
private module;
|
|
9
|
+
private workerPublicPath;
|
|
10
|
+
name: BuiltinPluginName;
|
|
11
|
+
affectedHooks: 'compilation';
|
|
12
|
+
constructor(chunkLoading: ChunkLoading, wasmLoading: WasmLoading, module: OutputModule, workerPublicPath: WorkerPublicPath);
|
|
13
|
+
raw(compiler: Compiler): BuiltinPlugin;
|
|
14
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import binding from '@ohos-ports/rspack-binding';
|
|
2
|
+
import type { Compiler, RspackPluginInstance } from '../index.js';
|
|
3
|
+
type AffectedHooks = keyof Compiler['hooks'];
|
|
4
|
+
export declare function canInherentFromParent(affectedHooks?: AffectedHooks): boolean;
|
|
5
|
+
export declare abstract class RspackBuiltinPlugin implements RspackPluginInstance {
|
|
6
|
+
abstract raw(compiler: Compiler): binding.BuiltinPlugin | undefined;
|
|
7
|
+
abstract name: binding.BuiltinPluginName | CustomPluginName;
|
|
8
|
+
affectedHooks?: AffectedHooks;
|
|
9
|
+
apply(compiler: Compiler): void;
|
|
10
|
+
}
|
|
11
|
+
export declare function createBuiltinPlugin<R>(name: binding.BuiltinPluginName | CustomPluginName, options: R): binding.BuiltinPlugin;
|
|
12
|
+
type CustomPluginName = string;
|
|
13
|
+
export declare function create<T extends any[], R>(name: binding.BuiltinPluginName | CustomPluginName, resolve: (this: Compiler, ...args: T) => R, affectedHooks?: AffectedHooks): {
|
|
14
|
+
new (...args: T): {
|
|
15
|
+
name: string;
|
|
16
|
+
_args: T;
|
|
17
|
+
affectedHooks: keyof import("../index.js").CompilerHooks | undefined;
|
|
18
|
+
raw(compiler: Compiler): binding.BuiltinPlugin;
|
|
19
|
+
apply(compiler: Compiler): void;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Create a wrapper class for builtin plugin.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```js
|
|
27
|
+
* const MyPlugin = createNativePlugin("MyPlugin", (options) => {
|
|
28
|
+
* return options;
|
|
29
|
+
* });
|
|
30
|
+
*
|
|
31
|
+
* new MyPlugin({
|
|
32
|
+
* foo: "bar"
|
|
33
|
+
* }).apply(compiler);
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare function createNativePlugin<T extends any[], R>(name: CustomPluginName, resolve: (this: Compiler, ...args: T) => R, affectedHooks?: AffectedHooks): {
|
|
37
|
+
new (...args: T): {
|
|
38
|
+
name: string;
|
|
39
|
+
_args: T;
|
|
40
|
+
affectedHooks: keyof import("../index.js").CompilerHooks | undefined;
|
|
41
|
+
raw(compiler: Compiler): binding.BuiltinPlugin;
|
|
42
|
+
apply(compiler: Compiler): void;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type RawCssExtractPluginOption } from '@ohos-ports/rspack-binding';
|
|
2
|
+
import type { Compiler, LiteralUnion } from '../../index.js';
|
|
3
|
+
export * from './loader.js';
|
|
4
|
+
export type { CssExtractRspackLoaderOptions } from './loader.js';
|
|
5
|
+
export interface CssExtractRspackPluginOptions {
|
|
6
|
+
filename?: RawCssExtractPluginOption['filename'];
|
|
7
|
+
chunkFilename?: RawCssExtractPluginOption['chunkFilename'];
|
|
8
|
+
ignoreOrder?: boolean;
|
|
9
|
+
insert?: string | ((linkTag: HTMLLinkElement) => void);
|
|
10
|
+
attributes?: Record<string, string>;
|
|
11
|
+
linkType?: LiteralUnion<'text/css', string> | false;
|
|
12
|
+
runtime?: boolean;
|
|
13
|
+
pathinfo?: boolean;
|
|
14
|
+
enforceRelative?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare class CssExtractRspackPlugin {
|
|
17
|
+
static pluginName: string;
|
|
18
|
+
static loader: string;
|
|
19
|
+
options: CssExtractRspackPluginOptions;
|
|
20
|
+
constructor(options?: CssExtractRspackPluginOptions);
|
|
21
|
+
apply(compiler: Compiler): void;
|
|
22
|
+
normalizeOptions(options: CssExtractRspackPluginOptions): RawCssExtractPluginOption;
|
|
23
|
+
}
|
|
24
|
+
export default CssExtractRspackPlugin;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { LoaderContext, LoaderDefinition } from '../../index.js';
|
|
2
|
+
export declare const BASE_URI = "rspack-css-extract://";
|
|
3
|
+
export declare const MODULE_TYPE = "css/mini-extract";
|
|
4
|
+
export declare const AUTO_PUBLIC_PATH = "__css_extract_public_path_auto__";
|
|
5
|
+
export declare const ABSOLUTE_PUBLIC_PATH = "rspack-css-extract:///css-extract-plugin/";
|
|
6
|
+
export declare const SINGLE_DOT_PATH_SEGMENT = "__css_extract_single_dot_path_segment__";
|
|
7
|
+
export interface CssExtractRspackLoaderOptions {
|
|
8
|
+
publicPath?: string | ((resourcePath: string, context: string) => string);
|
|
9
|
+
emit?: boolean;
|
|
10
|
+
esModule?: boolean;
|
|
11
|
+
layer?: string;
|
|
12
|
+
defaultExport?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function hotLoader(content: string, context: {
|
|
15
|
+
loaderContext: LoaderContext;
|
|
16
|
+
options?: CssExtractRspackLoaderOptions;
|
|
17
|
+
locals?: Record<string, string>;
|
|
18
|
+
}): string;
|
|
19
|
+
declare const loader: LoaderDefinition;
|
|
20
|
+
export declare const pitch: LoaderDefinition['pitch'];
|
|
21
|
+
export default loader;
|