@rspack-debug/browser 0.0.0-alpha.0 → 1.6.4
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/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 +417 -0
- package/dist/Compiler.d.ts +223 -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 +328 -0
- package/dist/RuntimeModule.d.ts +32 -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/binding.d.ts +8 -0
- package/dist/browser/BrowserHttpImportEsmPlugin.d.ts +48 -0
- package/dist/browser/BrowserRequirePlugin.d.ts +38 -0
- package/dist/browser/buffer.d.ts +1 -0
- package/dist/browser/fs.d.ts +13 -0
- package/dist/browser/index.d.ts +11 -0
- package/dist/browser/service.d.ts +25 -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 +83 -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/ChunkPrefetchPreloadPlugin.d.ts +9 -0
- package/dist/builtin-plugin/CircularDependencyRspackPlugin.d.ts +59 -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 +28 -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/WarnCaseSensitiveModulesPlugin.d.ts +9 -0
- package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +7 -0
- package/dist/builtin-plugin/WorkerPlugin.d.ts +13 -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 +4 -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 +4 -0
- package/dist/config/devServer.d.ts +314 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/normalization.d.ts +169 -0
- package/dist/config/target.d.ts +89 -0
- package/dist/config/types.d.ts +2383 -0
- package/dist/container/ContainerPlugin.d.ts +40 -0
- package/dist/container/ContainerReferencePlugin.d.ts +33 -0
- package/dist/container/ModuleFederationManifestPlugin.d.ts +37 -0
- package/dist/container/ModuleFederationPlugin.d.ts +15 -0
- package/dist/container/ModuleFederationPluginV1.d.ts +22 -0
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +12 -0
- package/dist/container/index.d.ts +4 -0
- package/dist/container/options.d.ts +3 -0
- package/dist/error/ConcurrentCompilationError.d.ts +14 -0
- package/dist/exports.d.ts +166 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.mjs +66931 -0
- package/dist/index.mjs.LICENSE.txt +19 -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 +34 -0
- package/dist/loader-runner/loadLoader.d.ts +12 -0
- package/dist/loader-runner/service.d.ts +71 -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/napi-binding.d.ts +3128 -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 +16 -0
- package/dist/rspack.wasi-browser.js +125 -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 +41 -0
- package/dist/sharing/ProvideSharedPlugin.d.ts +34 -0
- package/dist/sharing/SharePlugin.d.ts +51 -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 +9 -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 +8 -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/wasi-worker-browser.mjs +23591 -0
- package/dist/wasi-worker-browser.mjs.LICENSE.txt +12 -0
- package/package.json +48 -9
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IFs, memfs as Memfs, Volume } from "memfs";
|
|
2
|
+
export declare const fs: IFs;
|
|
3
|
+
export declare const volume: Volume;
|
|
4
|
+
export declare const memfs: typeof Memfs;
|
|
5
|
+
declare const readFileSync: (file: import("memfs/lib/core").TFileId, options?: import("memfs/lib/node/types/options").IReadFileOptions | string) => import("memfs/lib/encoding").TDataOut, readdirSync: (path: import("memfs/lib/node/types/misc").PathLike, options?: import("memfs/lib/node/types/options").IReaddirOptions | string) => import("memfs/lib/encoding").TDataOut[] | import("memfs/lib/node/Dirent").Dirent[], lstat: {
|
|
6
|
+
(path: import("memfs/lib/node/types/misc").PathLike, callback: import("memfs/lib/node/types/misc").TCallback<import("memfs/lib/node/Stats").Stats>): void;
|
|
7
|
+
(path: import("memfs/lib/node/types/misc").PathLike, options: import("memfs/lib/node/types/options").IStatOptions, callback: import("memfs/lib/node/types/misc").TCallback<import("memfs/lib/node/Stats").Stats>): void;
|
|
8
|
+
}, existsSync: (path: import("memfs/lib/node/types/misc").PathLike) => boolean, readdir: {
|
|
9
|
+
(path: import("memfs/lib/node/types/misc").PathLike, callback: import("memfs/lib/node/types/misc").TCallback<import("memfs/lib/encoding").TDataOut[] | import("memfs/lib/node/Dirent").Dirent[]>): any;
|
|
10
|
+
(path: import("memfs/lib/node/types/misc").PathLike, options: import("memfs/lib/node/types/options").IReaddirOptions | string, callback: import("memfs/lib/node/types/misc").TCallback<import("memfs/lib/encoding").TDataOut[] | import("memfs/lib/node/Dirent").Dirent[]>): any;
|
|
11
|
+
}, watch: (path: import("memfs/lib/node/types/misc").PathLike, options?: import("memfs/lib/node/volume").IWatchOptions | string, listener?: (eventType: string, filename: string) => void) => import("memfs/lib/node/volume").FSWatcher;
|
|
12
|
+
export default fs;
|
|
13
|
+
export { readFileSync, readdirSync, lstat, existsSync, readdir, watch };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "../index";
|
|
2
|
+
export { BrowserHttpImportEsmPlugin } from "./BrowserHttpImportEsmPlugin";
|
|
3
|
+
export { BrowserRequirePlugin } from "./BrowserRequirePlugin";
|
|
4
|
+
export declare const builtinMemFs: {
|
|
5
|
+
fs: import("memfs").IFs;
|
|
6
|
+
volume: import("memfs").Volume;
|
|
7
|
+
memfs: (json?: import("memfs").NestedDirectoryJSON, cwd?: string) => {
|
|
8
|
+
fs: import("memfs").IFs;
|
|
9
|
+
vol: import("memfs").Volume;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare enum RequestType {
|
|
2
|
+
AddDependency = "AddDependency",
|
|
3
|
+
AddContextDependency = "AddContextDependency",
|
|
4
|
+
AddMissingDependency = "AddMissingDependency",
|
|
5
|
+
AddBuildDependency = "AddBuildDependency",
|
|
6
|
+
GetDependencies = "GetDependencies",
|
|
7
|
+
GetContextDependencies = "GetContextDependencies",
|
|
8
|
+
GetMissingDependencies = "GetMissingDependencies",
|
|
9
|
+
ClearDependencies = "ClearDependencies",
|
|
10
|
+
Resolve = "Resolve",
|
|
11
|
+
GetResolve = "GetResolve",
|
|
12
|
+
GetLogger = "GetLogger",
|
|
13
|
+
EmitError = "EmitError",
|
|
14
|
+
EmitWarning = "EmitWarning",
|
|
15
|
+
EmitFile = "EmitFile",
|
|
16
|
+
EmitDiagnostic = "EmitDiagnostic",
|
|
17
|
+
SetCacheable = "SetCacheable",
|
|
18
|
+
ImportModule = "ImportModule",
|
|
19
|
+
UpdateLoaderObjects = "UpdateLoaderObjects",
|
|
20
|
+
CompilationGetPath = "CompilationGetPath",
|
|
21
|
+
CompilationGetPathWithInfo = "CompilationGetPathWithInfo",
|
|
22
|
+
CompilationGetAssetPath = "CompilationGetAssetPath",
|
|
23
|
+
CompilationGetAssetPathWithInfo = "CompilationGetAssetPathWithInfo"
|
|
24
|
+
}
|
|
25
|
+
export declare function run(): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./swc";
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
MIT License
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2021-present Devon Govett
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
export declare function toFeatures(featureOptions: FeatureOptions): Features;
|
|
25
|
+
export declare enum Features {
|
|
26
|
+
Empty = 0,
|
|
27
|
+
Nesting = 1,
|
|
28
|
+
NotSelectorList = 2,
|
|
29
|
+
DirSelector = 4,
|
|
30
|
+
LangSelectorList = 8,
|
|
31
|
+
IsSelector = 16,
|
|
32
|
+
TextDecorationThicknessPercent = 32,
|
|
33
|
+
MediaIntervalSyntax = 64,
|
|
34
|
+
MediaRangeSyntax = 128,
|
|
35
|
+
CustomMediaQueries = 256,
|
|
36
|
+
ClampFunction = 512,
|
|
37
|
+
ColorFunction = 1024,
|
|
38
|
+
OklabColors = 2048,
|
|
39
|
+
LabColors = 4096,
|
|
40
|
+
P3Colors = 8192,
|
|
41
|
+
HexAlphaColors = 16384,
|
|
42
|
+
SpaceSeparatedColorNotation = 32768,
|
|
43
|
+
FontFamilySystemUi = 65536,
|
|
44
|
+
DoublePositionGradients = 131072,
|
|
45
|
+
VendorPrefixes = 262144,
|
|
46
|
+
LogicalProperties = 524288,
|
|
47
|
+
Selectors = 31,
|
|
48
|
+
MediaQueries = 448,
|
|
49
|
+
Color = 64512
|
|
50
|
+
}
|
|
51
|
+
export interface Targets {
|
|
52
|
+
android?: number;
|
|
53
|
+
chrome?: number;
|
|
54
|
+
edge?: number;
|
|
55
|
+
firefox?: number;
|
|
56
|
+
ie?: number;
|
|
57
|
+
ios_saf?: number;
|
|
58
|
+
opera?: number;
|
|
59
|
+
safari?: number;
|
|
60
|
+
samsung?: number;
|
|
61
|
+
}
|
|
62
|
+
export interface Drafts {
|
|
63
|
+
/** Whether to enable @custom-media rules. */
|
|
64
|
+
customMedia?: boolean;
|
|
65
|
+
}
|
|
66
|
+
export interface NonStandard {
|
|
67
|
+
/** Whether to enable the non-standard >>> and /deep/ selector combinators used by Angular and Vue. */
|
|
68
|
+
deepSelectorCombinator?: boolean;
|
|
69
|
+
}
|
|
70
|
+
export interface PseudoClasses {
|
|
71
|
+
hover?: string;
|
|
72
|
+
active?: string;
|
|
73
|
+
focus?: string;
|
|
74
|
+
focusVisible?: string;
|
|
75
|
+
focusWithin?: string;
|
|
76
|
+
}
|
|
77
|
+
export type FeatureOptions = {
|
|
78
|
+
nesting?: boolean;
|
|
79
|
+
notSelectorList?: boolean;
|
|
80
|
+
dirSelector?: boolean;
|
|
81
|
+
langSelectorList?: boolean;
|
|
82
|
+
isSelector?: boolean;
|
|
83
|
+
textDecorationThicknessPercent?: boolean;
|
|
84
|
+
mediaIntervalSyntax?: boolean;
|
|
85
|
+
mediaRangeSyntax?: boolean;
|
|
86
|
+
customMediaQueries?: boolean;
|
|
87
|
+
clampFunction?: boolean;
|
|
88
|
+
colorFunction?: boolean;
|
|
89
|
+
oklabColors?: boolean;
|
|
90
|
+
labColors?: boolean;
|
|
91
|
+
p3Colors?: boolean;
|
|
92
|
+
hexAlphaColors?: boolean;
|
|
93
|
+
spaceSeparatedColorNotation?: boolean;
|
|
94
|
+
fontFamilySystemUi?: boolean;
|
|
95
|
+
doublePositionGradients?: boolean;
|
|
96
|
+
vendorPrefixes?: boolean;
|
|
97
|
+
logicalProperties?: boolean;
|
|
98
|
+
selectors?: boolean;
|
|
99
|
+
mediaQueries?: boolean;
|
|
100
|
+
color?: boolean;
|
|
101
|
+
};
|
|
102
|
+
export type LoaderOptions = {
|
|
103
|
+
minify?: boolean;
|
|
104
|
+
errorRecovery?: boolean;
|
|
105
|
+
targets?: Targets | string[] | string;
|
|
106
|
+
include?: FeatureOptions;
|
|
107
|
+
exclude?: FeatureOptions;
|
|
108
|
+
/**
|
|
109
|
+
* @deprecated Use `drafts` instead.
|
|
110
|
+
* This will be removed in the next major version.
|
|
111
|
+
*/
|
|
112
|
+
draft?: Drafts;
|
|
113
|
+
drafts?: Drafts;
|
|
114
|
+
nonStandard?: NonStandard;
|
|
115
|
+
pseudoClasses?: PseudoClasses;
|
|
116
|
+
unusedSymbols?: string[];
|
|
117
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type CollectTypeScriptInfoOptions = {
|
|
2
|
+
/**
|
|
3
|
+
* Whether to collect type exports information for `typeReexportsPresence`.
|
|
4
|
+
* This is used to check type exports of submodules when running in `'tolerant'` mode.
|
|
5
|
+
* @default false
|
|
6
|
+
*/
|
|
7
|
+
typeExports?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Whether to collect information about exported `enum`s.
|
|
10
|
+
* - `true` will collect all `enum` information, including `const enum`s and regular `enum`s.
|
|
11
|
+
* - `false` will not collect any `enum` information.
|
|
12
|
+
* - `'const-only'` will gather only `const enum`s, enabling Rspack to perform cross-module
|
|
13
|
+
* inlining optimizations for them.
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
exportedEnum?: boolean | "const-only";
|
|
17
|
+
};
|
|
18
|
+
export declare function resolveCollectTypeScriptInfo(options: CollectTypeScriptInfoOptions): {
|
|
19
|
+
typeExports: boolean | undefined;
|
|
20
|
+
exportedEnum: string;
|
|
21
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { CollectTypeScriptInfoOptions } from "./collectTypeScriptInfo";
|
|
2
|
+
export { resolveCollectTypeScriptInfo } from "./collectTypeScriptInfo";
|
|
3
|
+
export type { PluginImportOptions } from "./pluginImport";
|
|
4
|
+
export { resolvePluginImport } from "./pluginImport";
|
|
5
|
+
export type { SwcLoaderEnvConfig, SwcLoaderEsParserConfig, SwcLoaderJscConfig, SwcLoaderModuleConfig, SwcLoaderOptions, SwcLoaderParserConfig, SwcLoaderTransformConfig, SwcLoaderTsParserConfig } from "./types";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
type RawStyleConfig = {
|
|
2
|
+
styleLibraryDirectory?: string;
|
|
3
|
+
custom?: string;
|
|
4
|
+
css?: string;
|
|
5
|
+
bool?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type RawPluginImportConfig = {
|
|
8
|
+
libraryName: string;
|
|
9
|
+
libraryDirectory?: string;
|
|
10
|
+
customName?: string;
|
|
11
|
+
customStyleName?: string;
|
|
12
|
+
style?: RawStyleConfig;
|
|
13
|
+
camelToDashComponentName?: boolean;
|
|
14
|
+
transformToDefaultImport?: boolean;
|
|
15
|
+
ignoreEsComponent?: string[];
|
|
16
|
+
ignoreStyleComponent?: string[];
|
|
17
|
+
};
|
|
18
|
+
type PluginImportConfig = {
|
|
19
|
+
libraryName: string;
|
|
20
|
+
libraryDirectory?: string;
|
|
21
|
+
customName?: string;
|
|
22
|
+
customStyleName?: string;
|
|
23
|
+
style?: string | boolean;
|
|
24
|
+
styleLibraryDirectory?: string;
|
|
25
|
+
camelToDashComponentName?: boolean;
|
|
26
|
+
transformToDefaultImport?: boolean;
|
|
27
|
+
ignoreEsComponent?: string[];
|
|
28
|
+
ignoreStyleComponent?: string[];
|
|
29
|
+
};
|
|
30
|
+
type PluginImportOptions = PluginImportConfig[];
|
|
31
|
+
declare function resolvePluginImport(pluginImport: PluginImportOptions): RawPluginImportConfig[] | undefined;
|
|
32
|
+
export { resolvePluginImport };
|
|
33
|
+
export type { PluginImportOptions };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { Config, EnvConfig, EsParserConfig, JscConfig, ModuleConfig, ParserConfig, TerserEcmaVersion, TransformConfig, TsParserConfig } from "@swc/types";
|
|
2
|
+
import type { CollectTypeScriptInfoOptions } from "./collectTypeScriptInfo";
|
|
3
|
+
import type { PluginImportOptions } from "./pluginImport";
|
|
4
|
+
export type SwcLoaderEnvConfig = EnvConfig;
|
|
5
|
+
export type SwcLoaderJscConfig = JscConfig;
|
|
6
|
+
export type SwcLoaderModuleConfig = ModuleConfig;
|
|
7
|
+
export type SwcLoaderParserConfig = ParserConfig;
|
|
8
|
+
export type SwcLoaderEsParserConfig = EsParserConfig;
|
|
9
|
+
export type SwcLoaderTsParserConfig = TsParserConfig;
|
|
10
|
+
export type SwcLoaderTransformConfig = TransformConfig;
|
|
11
|
+
export type SwcLoaderOptions = Config & {
|
|
12
|
+
isModule?: boolean | "unknown";
|
|
13
|
+
/**
|
|
14
|
+
* Experimental features provided by Rspack.
|
|
15
|
+
* @experimental
|
|
16
|
+
*/
|
|
17
|
+
rspackExperiments?: {
|
|
18
|
+
import?: PluginImportOptions;
|
|
19
|
+
/**
|
|
20
|
+
* Collects information from TypeScript's AST for consumption by subsequent Rspack processes,
|
|
21
|
+
* providing better TypeScript development experience and smaller output bundle size.
|
|
22
|
+
*/
|
|
23
|
+
collectTypeScriptInfo?: CollectTypeScriptInfoOptions;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export interface TerserCompressOptions {
|
|
27
|
+
arguments?: boolean;
|
|
28
|
+
arrows?: boolean;
|
|
29
|
+
booleans?: boolean;
|
|
30
|
+
booleans_as_integers?: boolean;
|
|
31
|
+
collapse_vars?: boolean;
|
|
32
|
+
comparisons?: boolean;
|
|
33
|
+
computed_props?: boolean;
|
|
34
|
+
conditionals?: boolean;
|
|
35
|
+
dead_code?: boolean;
|
|
36
|
+
defaults?: boolean;
|
|
37
|
+
directives?: boolean;
|
|
38
|
+
drop_console?: boolean;
|
|
39
|
+
drop_debugger?: boolean;
|
|
40
|
+
ecma?: TerserEcmaVersion;
|
|
41
|
+
evaluate?: boolean;
|
|
42
|
+
expression?: boolean;
|
|
43
|
+
global_defs?: any;
|
|
44
|
+
hoist_funs?: boolean;
|
|
45
|
+
hoist_props?: boolean;
|
|
46
|
+
hoist_vars?: boolean;
|
|
47
|
+
ie8?: boolean;
|
|
48
|
+
if_return?: boolean;
|
|
49
|
+
inline?: 0 | 1 | 2 | 3;
|
|
50
|
+
join_vars?: boolean;
|
|
51
|
+
keep_classnames?: boolean;
|
|
52
|
+
keep_fargs?: boolean;
|
|
53
|
+
keep_fnames?: boolean;
|
|
54
|
+
keep_infinity?: boolean;
|
|
55
|
+
loops?: boolean;
|
|
56
|
+
negate_iife?: boolean;
|
|
57
|
+
passes?: number;
|
|
58
|
+
properties?: boolean;
|
|
59
|
+
pure_getters?: any;
|
|
60
|
+
pure_funcs?: string[];
|
|
61
|
+
reduce_funcs?: boolean;
|
|
62
|
+
reduce_vars?: boolean;
|
|
63
|
+
sequences?: any;
|
|
64
|
+
side_effects?: boolean;
|
|
65
|
+
switches?: boolean;
|
|
66
|
+
top_retain?: any;
|
|
67
|
+
toplevel?: any;
|
|
68
|
+
typeofs?: boolean;
|
|
69
|
+
unsafe?: boolean;
|
|
70
|
+
unsafe_passes?: boolean;
|
|
71
|
+
unsafe_arrows?: boolean;
|
|
72
|
+
unsafe_comps?: boolean;
|
|
73
|
+
unsafe_function?: boolean;
|
|
74
|
+
unsafe_math?: boolean;
|
|
75
|
+
unsafe_symbols?: boolean;
|
|
76
|
+
unsafe_methods?: boolean;
|
|
77
|
+
unsafe_proto?: boolean;
|
|
78
|
+
unsafe_regexp?: boolean;
|
|
79
|
+
unsafe_undefined?: boolean;
|
|
80
|
+
unused?: boolean;
|
|
81
|
+
const_to_let?: boolean;
|
|
82
|
+
module?: boolean;
|
|
83
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const APIPlugin: {
|
|
2
|
+
new (): {
|
|
3
|
+
name: string;
|
|
4
|
+
_args: [];
|
|
5
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
6
|
+
raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
|
|
7
|
+
apply(compiler: import("..").Compiler): void;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const ArrayPushCallbackChunkFormatPlugin: {
|
|
2
|
+
new (): {
|
|
3
|
+
name: string;
|
|
4
|
+
_args: [];
|
|
5
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
6
|
+
raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
|
|
7
|
+
apply(compiler: import("..").Compiler): void;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const AssetModulesPlugin: {
|
|
2
|
+
new (): {
|
|
3
|
+
name: string;
|
|
4
|
+
_args: [];
|
|
5
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
6
|
+
raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
|
|
7
|
+
apply(compiler: import("..").Compiler): void;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const AsyncWebAssemblyModulesPlugin: {
|
|
2
|
+
new (): {
|
|
3
|
+
name: string;
|
|
4
|
+
_args: [];
|
|
5
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
6
|
+
raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
|
|
7
|
+
apply(compiler: import("..").Compiler): void;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type Chunk } from "../binding";
|
|
2
|
+
export type Rule = string | RegExp;
|
|
3
|
+
export type Rules = Rule[] | Rule;
|
|
4
|
+
export type BannerFunction = (args: {
|
|
5
|
+
hash: string;
|
|
6
|
+
chunk: Chunk;
|
|
7
|
+
filename: string;
|
|
8
|
+
}) => string;
|
|
9
|
+
export type BannerContent = string | BannerFunction;
|
|
10
|
+
export type BannerPluginOptions = {
|
|
11
|
+
/** Specifies the banner, it will be wrapped in a comment. */
|
|
12
|
+
banner: BannerContent;
|
|
13
|
+
/** If true, the banner will only be added to the entry chunks. */
|
|
14
|
+
entryOnly?: boolean;
|
|
15
|
+
/** Exclude all modules matching any of these conditions. */
|
|
16
|
+
exclude?: Rules;
|
|
17
|
+
/** Include all modules matching any of these conditions. */
|
|
18
|
+
include?: Rules;
|
|
19
|
+
/** If true, banner will not be wrapped in a comment. */
|
|
20
|
+
raw?: boolean;
|
|
21
|
+
/** If true, banner will be placed at the end of the output. */
|
|
22
|
+
footer?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The stage of the compilation in which the banner should be injected.
|
|
25
|
+
* @default PROCESS_ASSETS_STAGE_ADDITIONS (-100)
|
|
26
|
+
*/
|
|
27
|
+
stage?: number;
|
|
28
|
+
/** Include all modules that pass test assertion. */
|
|
29
|
+
test?: Rules;
|
|
30
|
+
};
|
|
31
|
+
export type BannerPluginArgument = BannerContent | BannerPluginOptions;
|
|
32
|
+
export declare const BannerPlugin: {
|
|
33
|
+
new (args: BannerPluginArgument): {
|
|
34
|
+
name: string;
|
|
35
|
+
_args: [args: BannerPluginArgument];
|
|
36
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
37
|
+
raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
|
|
38
|
+
apply(compiler: import("..").Compiler): void;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type BundleInfoOptions = {
|
|
2
|
+
version?: string;
|
|
3
|
+
bundler?: string;
|
|
4
|
+
force?: boolean | string[];
|
|
5
|
+
};
|
|
6
|
+
export declare const BundlerInfoRspackPlugin: {
|
|
7
|
+
new (options: BundleInfoOptions): {
|
|
8
|
+
name: string;
|
|
9
|
+
_args: [options: BundleInfoOptions];
|
|
10
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
11
|
+
raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
|
|
12
|
+
apply(compiler: import("..").Compiler): void;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const ChunkPrefetchPreloadPlugin: {
|
|
2
|
+
new (): {
|
|
3
|
+
name: string;
|
|
4
|
+
_args: [];
|
|
5
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
6
|
+
raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
|
|
7
|
+
apply(compiler: import("..").Compiler): void;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from "../binding";
|
|
2
|
+
import type { Compilation } from "../Compilation";
|
|
3
|
+
import type { Compiler } from "../Compiler";
|
|
4
|
+
import type { Module } from "../Module";
|
|
5
|
+
import { RspackBuiltinPlugin } from "./base";
|
|
6
|
+
export type CircularDependencyRspackPluginOptions = {
|
|
7
|
+
/**
|
|
8
|
+
* When `true`, the plugin will emit `ERROR` diagnostics rather than the
|
|
9
|
+
* default `WARN` level.
|
|
10
|
+
*/
|
|
11
|
+
failOnError?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* When `true`, asynchronous imports like `import("some-module")` will not
|
|
14
|
+
* be considered connections that can create cycles.
|
|
15
|
+
*/
|
|
16
|
+
allowAsyncCycles?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Cycles containing any module name that matches this regex will _not_ be
|
|
19
|
+
* counted as a cycle.
|
|
20
|
+
*/
|
|
21
|
+
exclude?: RegExp;
|
|
22
|
+
/**
|
|
23
|
+
* List of dependency connections that should not count for creating cycles.
|
|
24
|
+
* Connections are represented as `[from, to]`, where each entry is matched
|
|
25
|
+
* against the _identifier_ for that module in the connection. The
|
|
26
|
+
* identifier contains the full, unique path for the module, including all
|
|
27
|
+
* of the loaders that were applied to it and any request parameters.
|
|
28
|
+
*
|
|
29
|
+
* When an entry is a String, it is tested as a _substring_ of the
|
|
30
|
+
* identifier. For example, the entry "components/Button" would match the
|
|
31
|
+
* module "app/design/components/Button.tsx". When the entry is a RegExp,
|
|
32
|
+
* it is tested against the entire identifier.
|
|
33
|
+
*/
|
|
34
|
+
ignoredConnections?: [string | RegExp, string | RegExp][];
|
|
35
|
+
/**
|
|
36
|
+
* Called once for every detected cycle. Providing this handler overrides the
|
|
37
|
+
* default behavior of adding diagnostics to the compilation.
|
|
38
|
+
*/
|
|
39
|
+
onDetected?(entrypoint: Module, modules: string[], compilation: Compilation): void;
|
|
40
|
+
/**
|
|
41
|
+
* Called once for every detected cycle that was ignored because of a rule,
|
|
42
|
+
* either from `exclude` or `ignoredConnections`.
|
|
43
|
+
*/
|
|
44
|
+
onIgnored?(entrypoint: Module, modules: string[], compilation: Compilation): void;
|
|
45
|
+
/**
|
|
46
|
+
* Called before cycle detection begins.
|
|
47
|
+
*/
|
|
48
|
+
onStart?(compilation: Compilation): void;
|
|
49
|
+
/**
|
|
50
|
+
* Called after cycle detection finishes.
|
|
51
|
+
*/
|
|
52
|
+
onEnd?(compilation: Compilation): void;
|
|
53
|
+
};
|
|
54
|
+
export declare class CircularDependencyRspackPlugin extends RspackBuiltinPlugin {
|
|
55
|
+
name: BuiltinPluginName;
|
|
56
|
+
_options: CircularDependencyRspackPluginOptions;
|
|
57
|
+
constructor(options: CircularDependencyRspackPluginOptions);
|
|
58
|
+
raw(compiler: Compiler): BuiltinPlugin;
|
|
59
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const CommonJsChunkFormatPlugin: {
|
|
2
|
+
new (): {
|
|
3
|
+
name: string;
|
|
4
|
+
_args: [];
|
|
5
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
6
|
+
raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
|
|
7
|
+
apply(compiler: import("..").Compiler): void;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const ContextReplacementPlugin: {
|
|
2
|
+
new (resourceRegExp: RegExp, newContentResource?: any, newContentRecursive?: any, newContentRegExp?: any): {
|
|
3
|
+
name: string;
|
|
4
|
+
_args: [resourceRegExp: RegExp, newContentResource?: any, newContentRecursive?: any, newContentRegExp?: any];
|
|
5
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
6
|
+
raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
|
|
7
|
+
apply(compiler: import("..").Compiler): void;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type RawCopyPattern } from "../binding";
|
|
2
|
+
export type CopyRspackPluginOptions = {
|
|
3
|
+
/** An array of objects that describe the copy operations to be performed. */
|
|
4
|
+
patterns: (string | (Pick<RawCopyPattern, "from"> & Partial<Omit<RawCopyPattern, "from">>))[];
|
|
5
|
+
};
|
|
6
|
+
export declare const CopyRspackPlugin: {
|
|
7
|
+
new (copy: CopyRspackPluginOptions): {
|
|
8
|
+
name: string;
|
|
9
|
+
_args: [copy: CopyRspackPluginOptions];
|
|
10
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
11
|
+
raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
|
|
12
|
+
apply(compiler: import("..").Compiler): void;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import binding from "../binding";
|
|
2
|
+
export interface CssChunkingPluginOptions {
|
|
3
|
+
strict?: boolean;
|
|
4
|
+
minSize?: number;
|
|
5
|
+
maxSize?: number;
|
|
6
|
+
/**
|
|
7
|
+
* This plugin is intended to be generic, but currently requires some special handling for Next.js.
|
|
8
|
+
* A `next` option has been added to accommodate this.
|
|
9
|
+
* In the future, once the design of CssChunkingPlugin becomes more stable, this option may be removed.
|
|
10
|
+
*/
|
|
11
|
+
nextjs?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const CssChunkingPlugin: {
|
|
14
|
+
new (options?: CssChunkingPluginOptions | undefined): {
|
|
15
|
+
name: string;
|
|
16
|
+
_args: [options?: CssChunkingPluginOptions | undefined];
|
|
17
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
18
|
+
raw(compiler: import("..").Compiler): binding.BuiltinPlugin;
|
|
19
|
+
apply(compiler: import("..").Compiler): void;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const CssModulesPlugin: {
|
|
2
|
+
new (): {
|
|
3
|
+
name: string;
|
|
4
|
+
_args: [];
|
|
5
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
6
|
+
raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
|
|
7
|
+
apply(compiler: import("..").Compiler): void;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const DataUriPlugin: {
|
|
2
|
+
new (): {
|
|
3
|
+
name: string;
|
|
4
|
+
_args: [];
|
|
5
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
6
|
+
raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
|
|
7
|
+
apply(compiler: import("..").Compiler): void;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type DefinePluginOptions = Record<string, CodeValue>;
|
|
2
|
+
export declare const DefinePlugin: {
|
|
3
|
+
new (define: DefinePluginOptions): {
|
|
4
|
+
name: string;
|
|
5
|
+
_args: [define: DefinePluginOptions];
|
|
6
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
7
|
+
raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("..").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
type CodeValue = RecursiveArrayOrRecord<CodeValuePrimitive>;
|
|
12
|
+
type CodeValuePrimitive = null | undefined | RegExp | Function | string | number | boolean | bigint;
|
|
13
|
+
type RecursiveArrayOrRecord<T> = {
|
|
14
|
+
[index: string]: RecursiveArrayOrRecord<T>;
|
|
15
|
+
} | RecursiveArrayOrRecord<T>[] | T;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from "../binding";
|
|
2
|
+
import { RspackBuiltinPlugin } from "./base";
|
|
3
|
+
export declare class DeterministicChunkIdsPlugin extends RspackBuiltinPlugin {
|
|
4
|
+
name: BuiltinPluginName;
|
|
5
|
+
affectedHooks: "compilation";
|
|
6
|
+
raw(): BuiltinPlugin;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from "../binding";
|
|
2
|
+
import { RspackBuiltinPlugin } from "./base";
|
|
3
|
+
export declare class DeterministicModuleIdsPlugin extends RspackBuiltinPlugin {
|
|
4
|
+
name: BuiltinPluginName;
|
|
5
|
+
affectedHooks: "compilation";
|
|
6
|
+
raw(): BuiltinPlugin;
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type DllEntryPluginOptions = {
|
|
2
|
+
name: string;
|
|
3
|
+
};
|
|
4
|
+
export declare const DllEntryPlugin: {
|
|
5
|
+
new (context: string, entries: string[], options: DllEntryPluginOptions): {
|
|
6
|
+
name: string;
|
|
7
|
+
_args: [context: string, entries: string[], options: DllEntryPluginOptions];
|
|
8
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
9
|
+
raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
|
|
10
|
+
apply(compiler: import("..").Compiler): void;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type RawDllReferenceAgencyPluginOptions } from "../binding";
|
|
2
|
+
export type DllReferenceAgencyPluginOptions = RawDllReferenceAgencyPluginOptions;
|
|
3
|
+
export declare const DllReferenceAgencyPlugin: {
|
|
4
|
+
new (options: RawDllReferenceAgencyPluginOptions): {
|
|
5
|
+
name: string;
|
|
6
|
+
_args: [options: RawDllReferenceAgencyPluginOptions];
|
|
7
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
8
|
+
raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
|
|
9
|
+
apply(compiler: import("..").Compiler): void;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from "../binding";
|
|
2
|
+
import type { Compiler } from "../Compiler";
|
|
3
|
+
import type { EntryDynamicNormalized } from "../config";
|
|
4
|
+
import { RspackBuiltinPlugin } from "./base";
|
|
5
|
+
export declare class DynamicEntryPlugin extends RspackBuiltinPlugin {
|
|
6
|
+
private context;
|
|
7
|
+
private entry;
|
|
8
|
+
name: BuiltinPluginName;
|
|
9
|
+
affectedHooks: "make";
|
|
10
|
+
constructor(context: string, entry: EntryDynamicNormalized);
|
|
11
|
+
raw(compiler: Compiler): BuiltinPlugin | undefined;
|
|
12
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const ElectronTargetPlugin: {
|
|
2
|
+
new (context?: string | undefined): {
|
|
3
|
+
name: string;
|
|
4
|
+
_args: [context?: string | undefined];
|
|
5
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
6
|
+
raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
|
|
7
|
+
apply(compiler: import("..").Compiler): void;
|
|
8
|
+
};
|
|
9
|
+
};
|