@rspack-debug/core 1.4.11 → 1.6.2
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/compiled/@swc/types/index.d.ts +15 -5
- package/compiled/@swc/types/package.json +1 -1
- package/compiled/browserslist-load-config/index.d.ts +11 -0
- package/compiled/browserslist-load-config/index.js +26 -40
- package/compiled/browserslist-load-config/package.json +1 -1
- package/compiled/watchpack/index.js +1015 -18
- package/compiled/webpack-sources/index.js +82 -82
- package/dist/Compilation.d.ts +17 -20
- package/dist/Compiler.d.ts +63 -32
- package/dist/Module.d.ts +3 -14
- package/dist/MultiCompiler.d.ts +7 -3
- package/dist/MultiStats.d.ts +3 -2
- package/dist/MultiWatching.d.ts +1 -1
- package/dist/NativeWatchFileSystem.d.ts +8 -2
- package/dist/NormalModuleFactory.d.ts +2 -2
- package/dist/Resolver.d.ts +13 -7
- package/dist/ResolverFactory.d.ts +8 -5
- package/dist/RspackError.d.ts +3 -0
- package/dist/RuntimeGlobals.d.ts +3 -0
- package/dist/RuntimeModule.d.ts +1 -1
- package/dist/VirtualModulesPlugin.d.ts +12 -0
- package/dist/Watching.d.ts +9 -0
- package/dist/builtin-loader/swc/pluginImport.d.ts +2 -2
- package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/BannerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CircularDependencyRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CssChunkingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DefinePlugin.d.ts +2 -2
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -2
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -2
- package/dist/builtin-plugin/DllEntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EsmLibraryPlugin.d.ts +11 -0
- package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ExternalsPlugin.d.ts +2 -1
- package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -2
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
- package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/InlineExportsPlugin.d.ts +9 -0
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LibManifestPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -2
- package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -2
- package/dist/builtin-plugin/ModuleInfoHeaderPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +1 -2
- package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +1 -2
- package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NormalModuleReplacementPlugin.d.ts +10 -0
- package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
- package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RsdoctorPlugin.d.ts +3 -3
- package/dist/builtin-plugin/RslibPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RstestPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +1 -2
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +3 -2
- package/dist/builtin-plugin/URLPlugin.d.ts +9 -0
- package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/base.d.ts +2 -2
- package/dist/builtin-plugin/css-extract/index.d.ts +2 -2
- package/dist/builtin-plugin/html-plugin/options.d.ts +0 -1
- package/dist/builtin-plugin/html-plugin/plugin.d.ts +2 -2
- package/dist/builtin-plugin/index.d.ts +4 -0
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +3 -17
- package/dist/config/adapterRuleUse.d.ts +65 -7
- package/dist/config/defaults.d.ts +0 -9
- package/dist/config/devServer.d.ts +12 -13
- package/dist/config/index.d.ts +1 -0
- package/dist/config/normalization.d.ts +18 -3
- package/dist/config/types.d.ts +119 -18
- package/dist/container/ModuleFederationManifestPlugin.d.ts +37 -0
- package/dist/container/ModuleFederationPlugin.d.ts +3 -1
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
- package/dist/cssExtractHmr.js +12 -13
- package/dist/cssExtractLoader.js +9 -10
- package/dist/exports.d.ts +16 -9
- package/dist/index.js +1556 -5443
- package/dist/lib/Cache.d.ts +1 -1
- package/dist/loader-runner/ModuleError.d.ts +7 -1
- package/dist/loader-runner/loadLoader.d.ts +2 -1
- package/dist/loader-runner/service.d.ts +1 -1
- package/dist/loader-runner/utils.d.ts +2 -1
- package/dist/moduleFederationDefaultRuntime.js +1 -1
- package/dist/stats/DefaultStatsFactoryPlugin.d.ts +16 -0
- package/dist/stats/statsFactoryUtils.d.ts +17 -1
- package/dist/util/ArrayQueue.d.ts +2 -2
- package/dist/util/bindingVersionCheck.d.ts +1 -1
- package/dist/util/comparators.d.ts +1 -1
- package/dist/util/fs.d.ts +25 -2
- package/dist/util/index.d.ts +0 -3
- package/dist/util/source.d.ts +5 -6
- package/dist/util/validateConfig.d.ts +5 -0
- package/dist/worker.js +152 -118
- package/hot/lazy-compilation-node.js +1 -3
- package/hot/lazy-compilation-web.js +4 -3
- package/module.d.ts +11 -14
- package/package.json +20 -20
- package/compiled/graceful-fs/index.d.ts +0 -13
- package/compiled/graceful-fs/index.js +0 -1063
- package/compiled/graceful-fs/license +0 -15
- package/compiled/graceful-fs/package.json +0 -1
- package/dist/lib/NormalModuleReplacementPlugin.d.ts +0 -29
- package/dist/loader-runner/ModuleWarning.d.ts +0 -7
- package/dist/schema/config.d.ts +0 -996
- package/dist/schema/loaders.d.ts +0 -400
- package/dist/schema/plugins.d.ts +0 -167
- package/dist/schema/utils.d.ts +0 -4
- package/dist/schema/validate.d.ts +0 -10
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
import { RspackBuiltinPlugin } from "../builtin-plugin/base";
|
|
3
|
+
import type { Compiler } from "../Compiler";
|
|
4
|
+
export type RemoteAliasMap = Record<string, {
|
|
5
|
+
name: string;
|
|
6
|
+
entry?: string;
|
|
7
|
+
}>;
|
|
8
|
+
export type ManifestExposeOption = {
|
|
9
|
+
path: string;
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
export type ManifestSharedOption = {
|
|
13
|
+
name: string;
|
|
14
|
+
version?: string;
|
|
15
|
+
requiredVersion?: string;
|
|
16
|
+
singleton?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export type ModuleFederationManifestPluginOptions = {
|
|
19
|
+
name?: string;
|
|
20
|
+
globalName?: string;
|
|
21
|
+
filePath?: string;
|
|
22
|
+
disableAssetsAnalyze?: boolean;
|
|
23
|
+
fileName?: string;
|
|
24
|
+
remoteAliasMap?: RemoteAliasMap;
|
|
25
|
+
exposes?: ManifestExposeOption[];
|
|
26
|
+
shared?: ManifestSharedOption[];
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* JS-side post-processing plugin: reads mf-manifest.json and mf-stats.json, executes additionalData callback and merges/overwrites manifest.
|
|
30
|
+
* To avoid cross-NAPI callback complexity, this plugin runs at the afterProcessAssets stage to ensure Rust-side MfManifestPlugin has already output its artifacts.
|
|
31
|
+
*/
|
|
32
|
+
export declare class ModuleFederationManifestPlugin extends RspackBuiltinPlugin {
|
|
33
|
+
name: BuiltinPluginName;
|
|
34
|
+
private opts;
|
|
35
|
+
constructor(opts: ModuleFederationManifestPluginOptions);
|
|
36
|
+
raw(compiler: Compiler): BuiltinPlugin;
|
|
37
|
+
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { Compiler } from "../Compiler";
|
|
2
|
+
import { type ModuleFederationManifestPluginOptions } from "./ModuleFederationManifestPlugin";
|
|
2
3
|
import type { ModuleFederationPluginV1Options } from "./ModuleFederationPluginV1";
|
|
3
4
|
export interface ModuleFederationPluginOptions extends Omit<ModuleFederationPluginV1Options, "enhanced"> {
|
|
4
5
|
runtimePlugins?: RuntimePlugins;
|
|
5
6
|
implementation?: string;
|
|
6
7
|
shareStrategy?: "version-first" | "loaded-first";
|
|
8
|
+
manifest?: boolean | Omit<ModuleFederationManifestPluginOptions, "remoteAliasMap" | "globalName" | "name" | "exposes" | "shared">;
|
|
7
9
|
}
|
|
8
|
-
export type RuntimePlugins = string[];
|
|
10
|
+
export type RuntimePlugins = string[] | [string, Record<string, unknown>][];
|
|
9
11
|
export declare class ModuleFederationPlugin {
|
|
10
12
|
private _options;
|
|
11
13
|
constructor(_options: ModuleFederationPluginOptions);
|
|
@@ -5,7 +5,7 @@ export declare const ModuleFederationRuntimePlugin: {
|
|
|
5
5
|
new (options?: ModuleFederationRuntimeOptions | undefined): {
|
|
6
6
|
name: string;
|
|
7
7
|
_args: [options?: ModuleFederationRuntimeOptions | undefined];
|
|
8
|
-
affectedHooks:
|
|
8
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
9
9
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
10
10
|
apply(compiler: import("..").Compiler): void;
|
|
11
11
|
};
|
package/dist/cssExtractHmr.js
CHANGED
|
@@ -34,16 +34,17 @@ __webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_expo
|
|
|
34
34
|
cssReload: ()=>cssReload,
|
|
35
35
|
normalizeUrl: ()=>normalizeUrl
|
|
36
36
|
});
|
|
37
|
-
|
|
37
|
+
const srcByModuleId = Object.create(null), noDocument = "undefined" == typeof document, { forEach } = Array.prototype;
|
|
38
38
|
function noop() {}
|
|
39
39
|
function updateCss(el, url) {
|
|
40
40
|
let normalizedUrl;
|
|
41
41
|
if (url) normalizedUrl = url;
|
|
42
42
|
else {
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
let href = el.getAttribute("href");
|
|
44
|
+
if (!href) return;
|
|
45
|
+
normalizedUrl = href.split("?")[0];
|
|
45
46
|
}
|
|
46
|
-
if (!isUrlRequest(
|
|
47
|
+
if (!isUrlRequest(el.href) || !1 === el.isLoaded || !normalizedUrl || !(normalizedUrl.indexOf(".css") > -1)) return;
|
|
47
48
|
el.visited = !0;
|
|
48
49
|
let newEl = el.cloneNode();
|
|
49
50
|
newEl.isLoaded = !1, newEl.addEventListener("load", ()=>{
|
|
@@ -93,14 +94,13 @@ function cssReload(moduleId, options) {
|
|
|
93
94
|
if (!src) return !1;
|
|
94
95
|
let elements = document.querySelectorAll("link"), loaded = !1;
|
|
95
96
|
return forEach.call(elements, (el)=>{
|
|
97
|
+
var href;
|
|
98
|
+
let ret, normalizedHref;
|
|
96
99
|
if (!el.href) return;
|
|
97
|
-
let url =
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}), ret;
|
|
102
|
-
}(el.href, src);
|
|
103
|
-
isUrlRequest(url) && !0 !== el.visited && url && (updateCss(el, url), loaded = !0);
|
|
100
|
+
let url = (href = el.href, ret = "", normalizedHref = normalizeUrl(href), src.some((url)=>{
|
|
101
|
+
normalizedHref.indexOf(src) > -1 && (ret = url);
|
|
102
|
+
}), ret);
|
|
103
|
+
!isUrlRequest(url) || !0 !== el.visited && url && (updateCss(el, url), loaded = !0);
|
|
104
104
|
}), loaded;
|
|
105
105
|
}(src);
|
|
106
106
|
if (options.locals) {
|
|
@@ -108,8 +108,7 @@ function cssReload(moduleId, options) {
|
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
110
|
reloaded ? console.log("[HMR] CSS reload %s", src && src.join(" ")) : (console.log("[HMR] Reload all CSS"), reloadAll());
|
|
111
|
-
}, timeout = 0, function() {
|
|
112
|
-
for(var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++)args[_key] = arguments[_key];
|
|
111
|
+
}, timeout = 0, function(...args) {
|
|
113
112
|
let self = this;
|
|
114
113
|
clearTimeout(timeout), timeout = setTimeout(function() {
|
|
115
114
|
return fn.apply(self, args);
|
package/dist/cssExtractLoader.js
CHANGED
|
@@ -19,21 +19,21 @@ __webpack_require__.n = (module)=>{
|
|
|
19
19
|
};
|
|
20
20
|
var __webpack_exports__ = {};
|
|
21
21
|
__webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_exports__, {
|
|
22
|
-
|
|
22
|
+
hotLoader: ()=>hotLoader,
|
|
23
23
|
default: ()=>css_extract_loader,
|
|
24
|
-
|
|
24
|
+
ABSOLUTE_PUBLIC_PATH: ()=>ABSOLUTE_PUBLIC_PATH,
|
|
25
25
|
MODULE_TYPE: ()=>MODULE_TYPE,
|
|
26
|
-
BASE_URI: ()=>BASE_URI,
|
|
27
|
-
hotLoader: ()=>hotLoader,
|
|
28
26
|
AUTO_PUBLIC_PATH: ()=>AUTO_PUBLIC_PATH,
|
|
29
|
-
pitch: ()=>pitch
|
|
27
|
+
pitch: ()=>pitch,
|
|
28
|
+
SINGLE_DOT_PATH_SEGMENT: ()=>SINGLE_DOT_PATH_SEGMENT,
|
|
29
|
+
BASE_URI: ()=>BASE_URI
|
|
30
30
|
});
|
|
31
|
-
|
|
31
|
+
const external_node_path_namespaceObject = require("node:path");
|
|
32
32
|
var external_node_path_default = __webpack_require__.n(external_node_path_namespaceObject);
|
|
33
33
|
function isAbsolutePath(str) {
|
|
34
34
|
return external_node_path_default().posix.isAbsolute(str) || external_node_path_default().win32.isAbsolute(str);
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
const PLUGIN_NAME = "css-extract-rspack-plugin", RELATIVE_PATH_REGEXP = /^\.\.?[/\\]/, BASE_URI = "webpack://", MODULE_TYPE = "css/mini-extract", AUTO_PUBLIC_PATH = "__mini_css_extract_plugin_public_path_auto__", ABSOLUTE_PUBLIC_PATH = `${BASE_URI}/mini-css-extract-plugin/`, SINGLE_DOT_PATH_SEGMENT = "__mini_css_extract_plugin_single_dot_path_segment__";
|
|
37
37
|
function hotLoader(content, context) {
|
|
38
38
|
let localsJsonString = JSON.stringify(JSON.stringify(context.locals));
|
|
39
39
|
return `${content}
|
|
@@ -72,7 +72,7 @@ function hotLoader(content, context) {
|
|
|
72
72
|
}
|
|
73
73
|
`;
|
|
74
74
|
}
|
|
75
|
-
|
|
75
|
+
const pitch = function(request, _, data) {
|
|
76
76
|
let publicPathForExtract;
|
|
77
77
|
if (this._compiler?.options?.experiments?.css && this._module && ("css" === this._module.type || "css/auto" === this._module.type || "css/global" === this._module.type || "css/module" === this._module.type)) {
|
|
78
78
|
let e = Error("use type 'css' and `CssExtractRspackPlugin` together, please set `experiments.css` to `false` or set `{ type: \"javascript/auto\" }` for rules with `CssExtractRspackPlugin` in your rspack config (now `CssExtractRspackPlugin` does nothing).");
|
|
@@ -140,8 +140,7 @@ let pitch = function(request, _, data) {
|
|
|
140
140
|
publicPath: publicPathForExtract,
|
|
141
141
|
baseUri: `${BASE_URI}/`
|
|
142
142
|
}, (error, exports1)=>{
|
|
143
|
-
|
|
144
|
-
handleExports(exports1);
|
|
143
|
+
error ? callback(error) : handleExports(exports1);
|
|
145
144
|
});
|
|
146
145
|
}, css_extract_loader = function(content) {
|
|
147
146
|
if (this._compiler?.options?.experiments?.css && this._module && ("css" === this._module.type || "css/auto" === this._module.type || "css/global" === this._module.type || "css/module" === this._module.type)) return content;
|
package/dist/exports.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare const rspackVersion: string;
|
|
2
2
|
declare const version: string;
|
|
3
3
|
export { rspackVersion, version };
|
|
4
|
-
export type { Asset, AssetInfo, Assets, CompilationParams, LogEntry } from "./Compilation";
|
|
4
|
+
export type { Asset, AssetInfo, Assets, ChunkPathData, CompilationParams, LogEntry, PathData } from "./Compilation";
|
|
5
5
|
export { Compilation } from "./Compilation";
|
|
6
|
-
export { Compiler } from "./Compiler";
|
|
6
|
+
export { Compiler, type CompilerHooks } from "./Compiler";
|
|
7
7
|
export type { MultiCompilerOptions, MultiRspackOptions } from "./MultiCompiler";
|
|
8
8
|
export { MultiCompiler } from "./MultiCompiler";
|
|
9
9
|
import { RspackOptionsApply } from "./rspackOptionsApply";
|
|
@@ -20,7 +20,7 @@ export type { default as ModuleGraph } from "./ModuleGraph";
|
|
|
20
20
|
export { MultiStats } from "./MultiStats";
|
|
21
21
|
export { NormalModule } from "./NormalModule";
|
|
22
22
|
export type { NormalModuleFactory } from "./NormalModuleFactory";
|
|
23
|
-
export type
|
|
23
|
+
export { type RspackError, type RspackSeverity, ValidationError } from "./RspackError";
|
|
24
24
|
export { RuntimeGlobals } from "./RuntimeGlobals";
|
|
25
25
|
export { RuntimeModule } from "./RuntimeModule";
|
|
26
26
|
export type { StatsAsset, StatsChunk, StatsCompilation, StatsError, StatsModule } from "./Stats";
|
|
@@ -42,8 +42,6 @@ type Config = {
|
|
|
42
42
|
};
|
|
43
43
|
export declare const config: Config;
|
|
44
44
|
export type * from "./config";
|
|
45
|
-
import { ValidationError } from "./schema/validate";
|
|
46
|
-
export { ValidationError };
|
|
47
45
|
export declare const util: {
|
|
48
46
|
createHash: (algorithm: "debug" | "xxhash64" | "md4" | "native-md4" | (string & {}) | (new () => import("./util/hash").default)) => import("./util/hash").default;
|
|
49
47
|
cleverMerge: <First, Second>(first: First, second: Second) => First | Second | (First & Second);
|
|
@@ -56,9 +54,8 @@ export { default as EntryOptionPlugin } from "./lib/EntryOptionPlugin";
|
|
|
56
54
|
export { EnvironmentPlugin } from "./lib/EnvironmentPlugin";
|
|
57
55
|
export { LoaderOptionsPlugin } from "./lib/LoaderOptionsPlugin";
|
|
58
56
|
export { LoaderTargetPlugin } from "./lib/LoaderTargetPlugin";
|
|
59
|
-
export {
|
|
60
|
-
|
|
61
|
-
import { FetchCompileAsyncWasmPlugin, lazyCompilationMiddleware, SubresourceIntegrityPlugin } from "./builtin-plugin";
|
|
57
|
+
export type { OutputFileSystem, WatchFileSystem } from "./util/fs";
|
|
58
|
+
import { EsmLibraryPlugin, FetchCompileAsyncWasmPlugin, lazyCompilationMiddleware, SubresourceIntegrityPlugin } from "./builtin-plugin";
|
|
62
59
|
interface Web {
|
|
63
60
|
FetchCompileAsyncWasmPlugin: typeof FetchCompileAsyncWasmPlugin;
|
|
64
61
|
}
|
|
@@ -133,15 +130,18 @@ export declare const sharing: {
|
|
|
133
130
|
export type { FeatureOptions as LightningcssFeatureOptions, LoaderOptions as LightningcssLoaderOptions } from "./builtin-loader/lightningcss/index";
|
|
134
131
|
export type { SwcLoaderEnvConfig, SwcLoaderEsParserConfig, SwcLoaderJscConfig, SwcLoaderModuleConfig, SwcLoaderOptions, SwcLoaderParserConfig, SwcLoaderTransformConfig, SwcLoaderTsParserConfig } from "./builtin-loader/swc/index";
|
|
135
132
|
export type { CircularDependencyRspackPluginOptions, CopyRspackPluginOptions, CssExtractRspackLoaderOptions, CssExtractRspackPluginOptions, EvalDevToolModulePluginOptions, HtmlRspackPluginOptions, LightningCssMinimizerRspackPluginOptions, RsdoctorPluginData, RsdoctorPluginHooks, SourceMapDevToolPluginOptions, SubresourceIntegrityPluginOptions, SwcJsMinimizerRspackPluginOptions } from "./builtin-plugin";
|
|
136
|
-
export { CircularDependencyRspackPlugin, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, HtmlRspackPlugin, LightningCssMinimizerRspackPlugin, SourceMapDevToolPlugin, SwcJsMinimizerRspackPlugin } from "./builtin-plugin";
|
|
133
|
+
export { CircularDependencyRspackPlugin, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, HtmlRspackPlugin, LightningCssMinimizerRspackPlugin, NormalModuleReplacementPlugin, SourceMapDevToolPlugin, SwcJsMinimizerRspackPlugin } from "./builtin-plugin";
|
|
134
|
+
import { EnforceExtension, ResolverFactory, async as resolveAsync, sync as resolveSync } from "@rspack/binding";
|
|
137
135
|
import { createNativePlugin } from "./builtin-plugin";
|
|
138
136
|
import { minify, minifySync, transform, transformSync } from "./swc";
|
|
137
|
+
import { VirtualModulesPlugin } from "./VirtualModulesPlugin";
|
|
139
138
|
interface Experiments {
|
|
140
139
|
globalTrace: {
|
|
141
140
|
register: (filter: string, layer: "logger" | "perfetto", output: string) => Promise<void>;
|
|
142
141
|
cleanup: () => Promise<void>;
|
|
143
142
|
};
|
|
144
143
|
RemoveDuplicateModulesPlugin: typeof RemoveDuplicateModulesPlugin;
|
|
144
|
+
EsmLibraryPlugin: typeof EsmLibraryPlugin;
|
|
145
145
|
RsdoctorPlugin: typeof RsdoctorPlugin;
|
|
146
146
|
RstestPlugin: typeof RstestPlugin;
|
|
147
147
|
RslibPlugin: typeof RslibPlugin;
|
|
@@ -153,7 +153,14 @@ interface Experiments {
|
|
|
153
153
|
transformSync: typeof transformSync;
|
|
154
154
|
minifySync: typeof minifySync;
|
|
155
155
|
};
|
|
156
|
+
resolver: {
|
|
157
|
+
ResolverFactory: typeof ResolverFactory;
|
|
158
|
+
EnforceExtension: typeof EnforceExtension;
|
|
159
|
+
async: typeof resolveAsync;
|
|
160
|
+
sync: typeof resolveSync;
|
|
161
|
+
};
|
|
156
162
|
CssChunkingPlugin: typeof CssChunkingPlugin;
|
|
157
163
|
createNativePlugin: typeof createNativePlugin;
|
|
164
|
+
VirtualModulesPlugin: typeof VirtualModulesPlugin;
|
|
158
165
|
}
|
|
159
166
|
export declare const experiments: Experiments;
|