@rspack-canary/browser 1.4.12-canary-f056cdd6-20250801072217 → 1.4.12-canary-d2f8a578-20250801090118
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 +420 -0
- package/dist/Compiler.d.ts +192 -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 +53 -0
- package/dist/ModuleGraph.d.ts +19 -0
- package/dist/ModuleTypeConstants.d.ts +8 -0
- package/dist/MultiCompiler.d.ts +78 -0
- package/dist/MultiStats.d.ts +22 -0
- package/dist/MultiWatching.d.ts +27 -0
- package/dist/NativeWatchFileSystem.d.ts +17 -0
- package/dist/NormalModule.d.ts +15 -0
- package/dist/NormalModuleFactory.d.ts +23 -0
- package/dist/Resolver.d.ts +24 -0
- package/dist/ResolverFactory.d.ts +14 -0
- package/dist/RspackError.d.ts +9 -0
- package/dist/RuleSetCompiler.d.ts +9 -0
- package/dist/RuntimeGlobals.d.ts +325 -0
- package/dist/RuntimeModule.d.ts +32 -0
- package/dist/Stats.d.ts +17 -0
- package/dist/Template.d.ts +77 -0
- package/dist/Watching.d.ts +47 -0
- package/dist/browser/buffer.d.ts +1 -0
- package/dist/browser/fs.d.ts +12 -0
- package/dist/browser/index.d.ts +5 -0
- package/dist/browser/service.d.ts +3 -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 +8 -0
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +8 -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/EvalDevToolModulePlugin.d.ts +11 -0
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +10 -0
- package/dist/builtin-plugin/ExternalsPlugin.d.ts +11 -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 +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/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 +10 -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 +8 -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 +8 -0
- package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +8 -0
- package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +9 -0
- package/dist/builtin-plugin/NodeTargetPlugin.d.ts +9 -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 +40 -0
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +214 -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 +83 -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 +80 -0
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +24 -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 +333 -0
- package/dist/config/browserslistTargetHandler.d.ts +15 -0
- package/dist/config/defaults.d.ts +13 -0
- package/dist/config/devServer.d.ts +207 -0
- package/dist/config/index.d.ts +4 -0
- package/dist/config/normalization.d.ts +154 -0
- package/dist/config/target.d.ts +89 -0
- package/dist/config/types.d.ts +2282 -0
- package/dist/container/ContainerPlugin.d.ts +40 -0
- package/dist/container/ContainerReferencePlugin.d.ts +33 -0
- package/dist/container/ModuleFederationPlugin.d.ts +13 -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 +57013 -0
- package/dist/index.mjs.LICENSE.txt +10 -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/NormalModuleReplacementPlugin.d.ts +29 -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 +7 -0
- package/dist/loader-runner/ModuleWarning.d.ts +7 -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/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 +101 -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/schema/config.d.ts +995 -0
- package/dist/schema/loaders.d.ts +399 -0
- package/dist/schema/plugins.d.ts +166 -0
- package/dist/schema/utils.d.ts +3 -0
- package/dist/schema/validate.d.ts +9 -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 +4 -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 +325 -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 +352 -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 +11 -0
- package/dist/util/memoize.d.ts +2 -0
- package/dist/util/require.d.ts +3 -0
- package/dist/util/runtime.d.ts +2 -0
- package/dist/util/smartGrouping.d.ts +21 -0
- package/dist/util/source.d.ts +7 -0
- package/dist/wasi-worker-browser.mjs +34 -0
- package/package.json +3 -3
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The following code is modified based on
|
|
3
|
+
* https://github.com/webpack/webpack/blob/v5.88.2/lib/RuntimeGlobals.js
|
|
4
|
+
*
|
|
5
|
+
* MIT Licensed
|
|
6
|
+
* Author Tobias Koppers \@sokra
|
|
7
|
+
* Copyright (c) JS Foundation and other contributors
|
|
8
|
+
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
|
+
*/
|
|
10
|
+
import type { JsRuntimeGlobals } from "@rspack/binding";
|
|
11
|
+
export declare function __from_binding_runtime_globals(runtimeRequirements: JsRuntimeGlobals): Set<string>;
|
|
12
|
+
export declare function __to_binding_runtime_globals(runtimeRequirements: Set<string>): JsRuntimeGlobals;
|
|
13
|
+
export declare const RuntimeGlobals: {
|
|
14
|
+
/**
|
|
15
|
+
* the internal require function
|
|
16
|
+
*/
|
|
17
|
+
readonly require: "__webpack_require__";
|
|
18
|
+
/**
|
|
19
|
+
* access to properties of the internal require function/object
|
|
20
|
+
*/
|
|
21
|
+
readonly requireScope: "__webpack_require__.*";
|
|
22
|
+
/**
|
|
23
|
+
* the internal exports object
|
|
24
|
+
*/
|
|
25
|
+
readonly exports: "__webpack_exports__";
|
|
26
|
+
/**
|
|
27
|
+
* top-level this need to be the exports object
|
|
28
|
+
*/
|
|
29
|
+
readonly thisAsExports: "top-level-this-exports";
|
|
30
|
+
/**
|
|
31
|
+
* runtime need to return the exports of the last entry module
|
|
32
|
+
*/
|
|
33
|
+
readonly returnExportsFromRuntime: "return-exports-from-runtime";
|
|
34
|
+
/**
|
|
35
|
+
* the internal module object
|
|
36
|
+
*/
|
|
37
|
+
readonly module: "module";
|
|
38
|
+
/**
|
|
39
|
+
* the internal module object
|
|
40
|
+
*/
|
|
41
|
+
readonly moduleId: "module.id";
|
|
42
|
+
/**
|
|
43
|
+
* the internal module object
|
|
44
|
+
*/
|
|
45
|
+
readonly moduleLoaded: "module.loaded";
|
|
46
|
+
/**
|
|
47
|
+
* the bundle public path
|
|
48
|
+
*/
|
|
49
|
+
readonly publicPath: "__webpack_require__.p";
|
|
50
|
+
/**
|
|
51
|
+
* the module id of the entry point
|
|
52
|
+
*/
|
|
53
|
+
readonly entryModuleId: "__webpack_require__.s";
|
|
54
|
+
/**
|
|
55
|
+
* the module cache
|
|
56
|
+
*/
|
|
57
|
+
readonly moduleCache: "__webpack_require__.c";
|
|
58
|
+
/**
|
|
59
|
+
* the module functions
|
|
60
|
+
*/
|
|
61
|
+
readonly moduleFactories: "__webpack_require__.m";
|
|
62
|
+
/**
|
|
63
|
+
* the module functions, with only write access
|
|
64
|
+
*/
|
|
65
|
+
readonly moduleFactoriesAddOnly: "__webpack_require__.m (add only)";
|
|
66
|
+
/**
|
|
67
|
+
* the chunk ensure function
|
|
68
|
+
*/
|
|
69
|
+
readonly ensureChunk: "__webpack_require__.e";
|
|
70
|
+
/**
|
|
71
|
+
* an object with handlers to ensure a chunk
|
|
72
|
+
*/
|
|
73
|
+
readonly ensureChunkHandlers: "__webpack_require__.f";
|
|
74
|
+
/**
|
|
75
|
+
* a runtime requirement if ensureChunkHandlers should include loading of chunk needed for entries
|
|
76
|
+
*/
|
|
77
|
+
readonly ensureChunkIncludeEntries: "__webpack_require__.f (include entries)";
|
|
78
|
+
/**
|
|
79
|
+
* the chunk prefetch function
|
|
80
|
+
*/
|
|
81
|
+
readonly prefetchChunk: "__webpack_require__.E";
|
|
82
|
+
/**
|
|
83
|
+
* an object with handlers to prefetch a chunk
|
|
84
|
+
*/
|
|
85
|
+
readonly prefetchChunkHandlers: "__webpack_require__.F";
|
|
86
|
+
/**
|
|
87
|
+
* the chunk preload function
|
|
88
|
+
*/
|
|
89
|
+
readonly preloadChunk: "__webpack_require__.G";
|
|
90
|
+
/**
|
|
91
|
+
* an object with handlers to preload a chunk
|
|
92
|
+
*/
|
|
93
|
+
readonly preloadChunkHandlers: "__webpack_require__.H";
|
|
94
|
+
/**
|
|
95
|
+
* the exported property define getters function
|
|
96
|
+
*/
|
|
97
|
+
readonly definePropertyGetters: "__webpack_require__.d";
|
|
98
|
+
/**
|
|
99
|
+
* define compatibility on export
|
|
100
|
+
*/
|
|
101
|
+
readonly makeNamespaceObject: "__webpack_require__.r";
|
|
102
|
+
/**
|
|
103
|
+
* create a fake namespace object
|
|
104
|
+
*/
|
|
105
|
+
readonly createFakeNamespaceObject: "__webpack_require__.t";
|
|
106
|
+
/**
|
|
107
|
+
* compatibility get default export
|
|
108
|
+
*/
|
|
109
|
+
readonly compatGetDefaultExport: "__webpack_require__.n";
|
|
110
|
+
/**
|
|
111
|
+
* ES modules decorator
|
|
112
|
+
*/
|
|
113
|
+
readonly harmonyModuleDecorator: "__webpack_require__.hmd";
|
|
114
|
+
/**
|
|
115
|
+
* node.js module decorator
|
|
116
|
+
*/
|
|
117
|
+
readonly nodeModuleDecorator: "__webpack_require__.nmd";
|
|
118
|
+
/**
|
|
119
|
+
* the webpack hash
|
|
120
|
+
*/
|
|
121
|
+
readonly getFullHash: "__webpack_require__.h";
|
|
122
|
+
/**
|
|
123
|
+
* an object containing all installed WebAssembly.Instance export objects keyed by module id
|
|
124
|
+
*/
|
|
125
|
+
readonly wasmInstances: "__webpack_require__.w";
|
|
126
|
+
/**
|
|
127
|
+
* instantiate a wasm instance from module exports object, id, hash and importsObject
|
|
128
|
+
*/
|
|
129
|
+
readonly instantiateWasm: "__webpack_require__.v";
|
|
130
|
+
/**
|
|
131
|
+
* the uncaught error handler for the webpack runtime
|
|
132
|
+
*/
|
|
133
|
+
readonly uncaughtErrorHandler: "__webpack_require__.oe";
|
|
134
|
+
/**
|
|
135
|
+
* the script nonce
|
|
136
|
+
*/
|
|
137
|
+
readonly scriptNonce: "__webpack_require__.nc";
|
|
138
|
+
/**
|
|
139
|
+
* function to load a script tag.
|
|
140
|
+
* Arguments: (url: string, done: (event) =\> void), key?: string | number, chunkId?: string | number) =\> void
|
|
141
|
+
* done function is called when loading has finished or timeout occurred.
|
|
142
|
+
* It will attach to existing script tags with data-webpack == uniqueName + ":" + key or src == url.
|
|
143
|
+
*/
|
|
144
|
+
readonly loadScript: "__webpack_require__.l";
|
|
145
|
+
/**
|
|
146
|
+
* function to promote a string to a TrustedScript using webpack's Trusted
|
|
147
|
+
* Types policy
|
|
148
|
+
* Arguments: (script: string) =\> TrustedScript
|
|
149
|
+
*/
|
|
150
|
+
readonly createScript: "__webpack_require__.ts";
|
|
151
|
+
/**
|
|
152
|
+
* function to promote a string to a TrustedScriptURL using webpack's Trusted
|
|
153
|
+
* Types policy
|
|
154
|
+
* Arguments: (url: string) =\> TrustedScriptURL
|
|
155
|
+
*/
|
|
156
|
+
readonly createScriptUrl: "__webpack_require__.tu";
|
|
157
|
+
/**
|
|
158
|
+
* function to return webpack's Trusted Types policy
|
|
159
|
+
* Arguments: () =\> TrustedTypePolicy
|
|
160
|
+
*/
|
|
161
|
+
readonly getTrustedTypesPolicy: "__webpack_require__.tt";
|
|
162
|
+
/**
|
|
163
|
+
* a flag when a chunk has a fetch priority
|
|
164
|
+
*/
|
|
165
|
+
readonly hasFetchPriority: "has fetch priority";
|
|
166
|
+
/**
|
|
167
|
+
* the chunk name of the chunk with the runtime
|
|
168
|
+
*/
|
|
169
|
+
readonly chunkName: "__webpack_require__.cn";
|
|
170
|
+
/**
|
|
171
|
+
* the runtime id of the current runtime
|
|
172
|
+
*/
|
|
173
|
+
readonly runtimeId: "__webpack_require__.j";
|
|
174
|
+
/**
|
|
175
|
+
* the filename of the script part of the chunk
|
|
176
|
+
*/
|
|
177
|
+
readonly getChunkScriptFilename: "__webpack_require__.u";
|
|
178
|
+
/**
|
|
179
|
+
* the filename of the css part of the chunk
|
|
180
|
+
*/
|
|
181
|
+
readonly getChunkCssFilename: "__webpack_require__.k";
|
|
182
|
+
/**
|
|
183
|
+
* a flag when a module/chunk/tree has css modules
|
|
184
|
+
*/
|
|
185
|
+
readonly hasCssModules: "has css modules";
|
|
186
|
+
/**
|
|
187
|
+
* the filename of the script part of the hot update chunk
|
|
188
|
+
*/
|
|
189
|
+
readonly getChunkUpdateScriptFilename: "__webpack_require__.hu";
|
|
190
|
+
/**
|
|
191
|
+
* the filename of the css part of the hot update chunk
|
|
192
|
+
*/
|
|
193
|
+
readonly getChunkUpdateCssFilename: "__webpack_require__.hk";
|
|
194
|
+
/**
|
|
195
|
+
* startup signal from runtime
|
|
196
|
+
* This will be called when the runtime chunk has been loaded.
|
|
197
|
+
*/
|
|
198
|
+
readonly startup: "__webpack_require__.x";
|
|
199
|
+
/**
|
|
200
|
+
* @deprecated
|
|
201
|
+
* creating a default startup function with the entry modules
|
|
202
|
+
*/
|
|
203
|
+
readonly startupNoDefault: "__webpack_require__.x (no default handler)";
|
|
204
|
+
/**
|
|
205
|
+
* startup signal from runtime but only used to add logic after the startup
|
|
206
|
+
*/
|
|
207
|
+
readonly startupOnlyAfter: "__webpack_require__.x (only after)";
|
|
208
|
+
/**
|
|
209
|
+
* startup signal from runtime but only used to add sync logic before the startup
|
|
210
|
+
*/
|
|
211
|
+
readonly startupOnlyBefore: "__webpack_require__.x (only before)";
|
|
212
|
+
/**
|
|
213
|
+
* global callback functions for installing chunks
|
|
214
|
+
*/
|
|
215
|
+
readonly chunkCallback: "webpackChunk";
|
|
216
|
+
/**
|
|
217
|
+
* method to startup an entrypoint with needed chunks.
|
|
218
|
+
* Signature: (moduleId: Id, chunkIds: Id[]) =\> any.
|
|
219
|
+
* Returns the exports of the module or a Promise
|
|
220
|
+
*/
|
|
221
|
+
readonly startupEntrypoint: "__webpack_require__.X";
|
|
222
|
+
/**
|
|
223
|
+
* register deferred code, which will run when certain
|
|
224
|
+
* chunks are loaded.
|
|
225
|
+
* Signature: (chunkIds: Id[], fn: () =\> any, priority: int \>= 0 = 0) =\> any
|
|
226
|
+
* Returned value will be returned directly when all chunks are already loaded
|
|
227
|
+
* When (priority & 1) it will wait for all other handlers with lower priority to
|
|
228
|
+
* be executed before itself is executed
|
|
229
|
+
*/
|
|
230
|
+
readonly onChunksLoaded: "__webpack_require__.O";
|
|
231
|
+
/**
|
|
232
|
+
* method to install a chunk that was loaded somehow
|
|
233
|
+
* Signature: (\{ id, ids, modules, runtime \}) =\> void
|
|
234
|
+
*/
|
|
235
|
+
readonly externalInstallChunk: "__webpack_require__.C";
|
|
236
|
+
/**
|
|
237
|
+
* interceptor for module executions
|
|
238
|
+
*/
|
|
239
|
+
readonly interceptModuleExecution: "__webpack_require__.i";
|
|
240
|
+
/**
|
|
241
|
+
* the global object
|
|
242
|
+
*/
|
|
243
|
+
readonly global: "__webpack_require__.g";
|
|
244
|
+
/**
|
|
245
|
+
* an object with all share scopes
|
|
246
|
+
*/
|
|
247
|
+
readonly shareScopeMap: "__webpack_require__.S";
|
|
248
|
+
/**
|
|
249
|
+
* The sharing init sequence function (only runs once per share scope).
|
|
250
|
+
* Has one argument, the name of the share scope.
|
|
251
|
+
* Creates a share scope if not existing
|
|
252
|
+
*/
|
|
253
|
+
readonly initializeSharing: "__webpack_require__.I";
|
|
254
|
+
/**
|
|
255
|
+
* The current scope when getting a module from a remote
|
|
256
|
+
*/
|
|
257
|
+
readonly currentRemoteGetScope: "__webpack_require__.R";
|
|
258
|
+
/**
|
|
259
|
+
* the filename of the HMR manifest
|
|
260
|
+
*/
|
|
261
|
+
readonly getUpdateManifestFilename: "__webpack_require__.hmrF";
|
|
262
|
+
/**
|
|
263
|
+
* function downloading the update manifest
|
|
264
|
+
*/
|
|
265
|
+
readonly hmrDownloadManifest: "__webpack_require__.hmrM";
|
|
266
|
+
/**
|
|
267
|
+
* array with handler functions to download chunk updates
|
|
268
|
+
*/
|
|
269
|
+
readonly hmrDownloadUpdateHandlers: "__webpack_require__.hmrC";
|
|
270
|
+
/**
|
|
271
|
+
* object with all hmr module data for all modules
|
|
272
|
+
*/
|
|
273
|
+
readonly hmrModuleData: "__webpack_require__.hmrD";
|
|
274
|
+
/**
|
|
275
|
+
* array with handler functions when a module should be invalidated
|
|
276
|
+
*/
|
|
277
|
+
readonly hmrInvalidateModuleHandlers: "__webpack_require__.hmrI";
|
|
278
|
+
/**
|
|
279
|
+
* the prefix for storing state of runtime modules when hmr is enabled
|
|
280
|
+
*/
|
|
281
|
+
readonly hmrRuntimeStatePrefix: "__webpack_require__.hmrS";
|
|
282
|
+
/**
|
|
283
|
+
* the AMD define function
|
|
284
|
+
*/
|
|
285
|
+
readonly amdDefine: "__webpack_require__.amdD";
|
|
286
|
+
/**
|
|
287
|
+
* the AMD options
|
|
288
|
+
*/
|
|
289
|
+
readonly amdOptions: "__webpack_require__.amdO";
|
|
290
|
+
/**
|
|
291
|
+
* the System polyfill object
|
|
292
|
+
*/
|
|
293
|
+
readonly system: "__webpack_require__.System";
|
|
294
|
+
/**
|
|
295
|
+
* the shorthand for Object.prototype.hasOwnProperty
|
|
296
|
+
* using of it decreases the compiled bundle size
|
|
297
|
+
*/
|
|
298
|
+
readonly hasOwnProperty: "__webpack_require__.o";
|
|
299
|
+
/**
|
|
300
|
+
* the System.register context object
|
|
301
|
+
*/
|
|
302
|
+
readonly systemContext: "__webpack_require__.y";
|
|
303
|
+
/**
|
|
304
|
+
* the baseURI of current document
|
|
305
|
+
*/
|
|
306
|
+
readonly baseURI: "__webpack_require__.b";
|
|
307
|
+
/**
|
|
308
|
+
* a RelativeURL class when relative URLs are used
|
|
309
|
+
*/
|
|
310
|
+
readonly relativeUrl: "__webpack_require__.U";
|
|
311
|
+
/**
|
|
312
|
+
* Creates an async module. The body function must be a async function.
|
|
313
|
+
* "module.exports" will be decorated with an AsyncModulePromise.
|
|
314
|
+
* The body function will be called.
|
|
315
|
+
* To handle async dependencies correctly do this: "([a, b, c] = await handleDependencies([a, b, c]));".
|
|
316
|
+
* If "hasAwaitAfterDependencies" is truthy, "handleDependencies()" must be called at the end of the body function.
|
|
317
|
+
* Signature: function(
|
|
318
|
+
* module: Module,
|
|
319
|
+
* body: (handleDependencies: (deps: AsyncModulePromise[]) =\> Promise\<any[]\> & () =\> void,
|
|
320
|
+
* hasAwaitAfterDependencies?: boolean
|
|
321
|
+
* ) =\> void
|
|
322
|
+
*/
|
|
323
|
+
readonly asyncModule: "__webpack_require__.a";
|
|
324
|
+
};
|
|
325
|
+
export declare const isReservedRuntimeGlobal: (r: string) => boolean;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { JsAddingRuntimeModule } from "@rspack/binding";
|
|
2
|
+
import type { Chunk } from "./Chunk";
|
|
3
|
+
import type { ChunkGraph } from "./ChunkGraph";
|
|
4
|
+
import type { Compilation } from "./Compilation";
|
|
5
|
+
export declare enum RuntimeModuleStage {
|
|
6
|
+
NORMAL = 0,
|
|
7
|
+
BASIC = 5,
|
|
8
|
+
ATTACH = 10,
|
|
9
|
+
TRIGGER = 20
|
|
10
|
+
}
|
|
11
|
+
export declare class RuntimeModule {
|
|
12
|
+
static STAGE_NORMAL: RuntimeModuleStage;
|
|
13
|
+
static STAGE_BASIC: RuntimeModuleStage;
|
|
14
|
+
static STAGE_ATTACH: RuntimeModuleStage;
|
|
15
|
+
static STAGE_TRIGGER: RuntimeModuleStage;
|
|
16
|
+
static __to_binding(compilation: Compilation, module: RuntimeModule): JsAddingRuntimeModule;
|
|
17
|
+
private _name;
|
|
18
|
+
private _stage;
|
|
19
|
+
fullHash: boolean;
|
|
20
|
+
dependentHash: boolean;
|
|
21
|
+
protected chunk: Chunk | null;
|
|
22
|
+
protected compilation: Compilation | null;
|
|
23
|
+
protected chunkGraph: ChunkGraph | null;
|
|
24
|
+
constructor(name: string, stage?: RuntimeModuleStage);
|
|
25
|
+
attach(compilation: Compilation, chunk: Chunk, chunkGraph: ChunkGraph): void;
|
|
26
|
+
get name(): string;
|
|
27
|
+
get stage(): RuntimeModuleStage;
|
|
28
|
+
identifier(): string;
|
|
29
|
+
readableIdentifier(): string;
|
|
30
|
+
shouldIsolate(): boolean;
|
|
31
|
+
generate(): string;
|
|
32
|
+
}
|
package/dist/Stats.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Compilation } from "./Compilation";
|
|
2
|
+
import type { StatsOptions, StatsValue } from "./config";
|
|
3
|
+
import type { StatsCompilation } from "./stats/statsFactoryUtils";
|
|
4
|
+
export type { StatsAsset, StatsChunk, StatsCompilation, StatsError, StatsModule } from "./stats/statsFactoryUtils";
|
|
5
|
+
export declare class Stats {
|
|
6
|
+
#private;
|
|
7
|
+
constructor(compilation: Compilation);
|
|
8
|
+
get compilation(): Compilation;
|
|
9
|
+
get hash(): Readonly<string | null>;
|
|
10
|
+
get startTime(): number | undefined;
|
|
11
|
+
get endTime(): number | undefined;
|
|
12
|
+
hasErrors(): boolean;
|
|
13
|
+
hasWarnings(): boolean;
|
|
14
|
+
toJson(opts?: StatsValue, forToString?: boolean): StatsCompilation;
|
|
15
|
+
toString(opts?: StatsValue): string;
|
|
16
|
+
}
|
|
17
|
+
export declare function normalizeStatsPreset(options?: StatsValue): StatsOptions;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The following code is modified based on
|
|
3
|
+
* https://github.com/webpack/webpack/blob/4b4ca3b/lib/Template.js
|
|
4
|
+
*
|
|
5
|
+
* MIT Licensed
|
|
6
|
+
* Author Tobias Koppers @sokra
|
|
7
|
+
* Copyright (c) JS Foundation and other contributors
|
|
8
|
+
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
|
+
*/
|
|
10
|
+
declare class Template {
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @param fn a runtime function (.runtime.js) "template"
|
|
14
|
+
* @returns the updated and normalized function string
|
|
15
|
+
*/
|
|
16
|
+
static getFunctionContent(fn: Function): string;
|
|
17
|
+
/**
|
|
18
|
+
* @param str the string converted to identifier
|
|
19
|
+
* @returns created identifier
|
|
20
|
+
*/
|
|
21
|
+
static toIdentifier(str: any): string;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @param str string to be converted to commented in bundle code
|
|
25
|
+
* @returns returns a commented version of string
|
|
26
|
+
*/
|
|
27
|
+
static toComment(str: string): string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @param str string to be converted to "normal comment"
|
|
31
|
+
* @returns returns a commented version of string
|
|
32
|
+
*/
|
|
33
|
+
static toNormalComment(str: string): string;
|
|
34
|
+
/**
|
|
35
|
+
* @param str string path to be normalized
|
|
36
|
+
* @returns normalized bundle-safe path
|
|
37
|
+
*/
|
|
38
|
+
static toPath(str: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* @param num number to convert to ident
|
|
41
|
+
* @returns returns single character ident
|
|
42
|
+
*/
|
|
43
|
+
static numberToIdentifier(num: number): string;
|
|
44
|
+
/**
|
|
45
|
+
* @param num number to convert to ident
|
|
46
|
+
* @returns returns single character ident
|
|
47
|
+
*/
|
|
48
|
+
static numberToIdentifierContinuation(num: number): string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @param s string to convert to identity
|
|
52
|
+
* @returns converted identity
|
|
53
|
+
*/
|
|
54
|
+
static indent(s: string | string[]): string;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @param s string to create prefix for
|
|
58
|
+
* @param prefix prefix to compose
|
|
59
|
+
* @returns returns new prefix string
|
|
60
|
+
*/
|
|
61
|
+
static prefix(s: string | string[], prefix: string): string;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @param str string or string collection
|
|
65
|
+
* @returns returns a single string from array
|
|
66
|
+
*/
|
|
67
|
+
static asString(str: string | string[]): string;
|
|
68
|
+
/**
|
|
69
|
+
* @param modules a collection of modules to get array bounds for
|
|
70
|
+
* @returns returns the upper and lower array bounds
|
|
71
|
+
* or false if not every module has a number based id
|
|
72
|
+
*/
|
|
73
|
+
static getModulesArrayBounds(modules: {
|
|
74
|
+
id: string | number;
|
|
75
|
+
}[]): [number, number] | false;
|
|
76
|
+
}
|
|
77
|
+
export { Template };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Callback } from "@rspack/lite-tapable";
|
|
2
|
+
import type { Compiler } from ".";
|
|
3
|
+
import { Stats } from ".";
|
|
4
|
+
import type { WatchOptions } from "./config";
|
|
5
|
+
import type { Watcher } from "./util/fs";
|
|
6
|
+
export declare class Watching {
|
|
7
|
+
#private;
|
|
8
|
+
watcher?: Watcher;
|
|
9
|
+
pausedWatcher?: Watcher;
|
|
10
|
+
compiler: Compiler;
|
|
11
|
+
handler: Callback<Error, Stats>;
|
|
12
|
+
callbacks: Callback<Error, void>[];
|
|
13
|
+
watchOptions: WatchOptions;
|
|
14
|
+
lastWatcherStartTime: number;
|
|
15
|
+
running: boolean;
|
|
16
|
+
blocked: boolean;
|
|
17
|
+
isBlocked: () => boolean;
|
|
18
|
+
onChange: () => void;
|
|
19
|
+
onInvalid: () => void;
|
|
20
|
+
invalid: boolean;
|
|
21
|
+
startTime?: number;
|
|
22
|
+
suspended: boolean;
|
|
23
|
+
constructor(compiler: Compiler, watchOptions: WatchOptions, handler: Callback<Error, Stats>);
|
|
24
|
+
watch(files: Iterable<string> & {
|
|
25
|
+
added?: Iterable<string>;
|
|
26
|
+
removed?: Iterable<string>;
|
|
27
|
+
}, dirs: Iterable<string> & {
|
|
28
|
+
added?: Iterable<string>;
|
|
29
|
+
removed?: Iterable<string>;
|
|
30
|
+
}, missing: Iterable<string> & {
|
|
31
|
+
added?: Iterable<string>;
|
|
32
|
+
removed?: Iterable<string>;
|
|
33
|
+
}): void;
|
|
34
|
+
close(callback?: () => void): void;
|
|
35
|
+
invalidate(callback?: Callback<Error, void>): void;
|
|
36
|
+
/**
|
|
37
|
+
* @internal This is not a public API yet, still unstable, might change in the future
|
|
38
|
+
*/
|
|
39
|
+
invalidateWithChangesAndRemovals(changedFiles?: Set<string>, removedFiles?: Set<string>, callback?: Callback<Error, void>): void;
|
|
40
|
+
/**
|
|
41
|
+
* The reason why this is _done instead of #done, is that in Webpack,
|
|
42
|
+
* it will rewrite this function to another function
|
|
43
|
+
*/
|
|
44
|
+
private _done;
|
|
45
|
+
suspend(): void;
|
|
46
|
+
resume(): void;
|
|
47
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Buffer } from "@napi-rs/wasm-runtime/fs";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IFs, Volume } from "memfs";
|
|
2
|
+
export declare const fs: IFs;
|
|
3
|
+
export declare const volume: Volume;
|
|
4
|
+
declare const readFileSync: (file: import("memfs/lib/volume").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/Dirent").Dirent[], lstat: {
|
|
5
|
+
(path: import("memfs/lib/node/types/misc").PathLike, callback: import("memfs/lib/volume").TCallback<import("memfs/lib/Stats").Stats>): void;
|
|
6
|
+
(path: import("memfs/lib/node/types/misc").PathLike, options: import("memfs/lib/node/types/options").IStatOptions, callback: import("memfs/lib/volume").TCallback<import("memfs/lib/Stats").Stats>): void;
|
|
7
|
+
}, existsSync: (path: import("memfs/lib/node/types/misc").PathLike) => boolean, readdir: {
|
|
8
|
+
(path: import("memfs/lib/node/types/misc").PathLike, callback: import("memfs/lib/volume").TCallback<import("memfs/lib/encoding").TDataOut[] | import("memfs/lib/Dirent").Dirent[]>): any;
|
|
9
|
+
(path: import("memfs/lib/node/types/misc").PathLike, options: import("memfs/lib/node/types/options").IReaddirOptions | string, callback: import("memfs/lib/volume").TCallback<import("memfs/lib/encoding").TDataOut[] | import("memfs/lib/Dirent").Dirent[]>): any;
|
|
10
|
+
}, watch: (path: import("memfs/lib/node/types/misc").PathLike, options?: import("memfs/lib/volume").IWatchOptions | string, listener?: (eventType: string, filename: string) => void) => import("memfs/lib/volume").FSWatcher;
|
|
11
|
+
export default fs;
|
|
12
|
+
export { readFileSync, readdirSync, lstat, existsSync, readdir, watch };
|
|
@@ -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";
|