@rspack/core 1.4.10 → 1.5.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiled/watchpack/index.js +149 -9
- package/dist/Compilation.d.ts +2 -2
- package/dist/Compiler.d.ts +5 -0
- package/dist/MultiCompiler.d.ts +1 -1
- package/dist/NativeWatchFileSystem.d.ts +3 -1
- package/dist/NormalModuleFactory.d.ts +2 -2
- package/dist/Resolver.d.ts +0 -6
- package/dist/ResolverFactory.d.ts +8 -5
- package/dist/VirtualModulesPlugin.d.ts +12 -0
- package/dist/builtin-loader/swc/collectTypeScriptInfo.d.ts +13 -0
- package/dist/builtin-loader/swc/types.d.ts +4 -0
- 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/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 +1 -1
- 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/EvalDevToolModulePlugin.d.ts +1 -1
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -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/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/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/MergeDuplicateChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
- 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/NoEmitOnErrorsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
- 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 +5 -1
- 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 -1
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/base.d.ts +2 -2
- package/dist/builtin-plugin/html-plugin/plugin.d.ts +1 -1
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -1
- package/dist/config/normalization.d.ts +7 -0
- package/dist/config/types.d.ts +19 -5
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
- package/dist/cssExtractLoader.js +55 -53
- package/dist/exports.d.ts +9 -1
- package/dist/index.js +313 -234
- 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/schema/config.d.ts +56 -47
- package/dist/schema/loaders.d.ts +5 -5
- package/dist/schema/plugins.d.ts +14 -10
- package/dist/util/bindingVersionCheck.d.ts +1 -1
- package/dist/util/require.d.ts +3 -0
- package/dist/worker.js +44 -9
- package/module.d.ts +9 -10
- package/package.json +11 -9
- package/compiled/glob-to-regexp/index.d.ts +0 -11
- package/compiled/glob-to-regexp/index.js +0 -187
- package/compiled/glob-to-regexp/package.json +0 -1
@@ -17,7 +17,7 @@ export declare const BuiltinLazyCompilationPlugin: {
|
|
17
17
|
data: string;
|
18
18
|
client: string;
|
19
19
|
}, cacheable: boolean, entries: boolean, imports: boolean, test?: RegExp | ((module: Module) => boolean) | undefined];
|
20
|
-
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
20
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
21
21
|
raw(compiler: import("../..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
22
22
|
apply(compiler: import("../..").Compiler): void;
|
23
23
|
};
|
@@ -95,6 +95,11 @@ export type ExperimentCacheNormalized = boolean | {
|
|
95
95
|
};
|
96
96
|
export interface ExperimentsNormalized {
|
97
97
|
cache?: ExperimentCacheNormalized;
|
98
|
+
/**
|
99
|
+
* @deprecated This option is deprecated and will be removed in future versions.
|
100
|
+
*
|
101
|
+
* Please use the Configuration top-level `lazyCompilation` option instead.
|
102
|
+
*/
|
98
103
|
lazyCompilation?: false | LazyCompilationOptions;
|
99
104
|
asyncWebAssembly?: boolean;
|
100
105
|
outputModule?: boolean;
|
@@ -111,6 +116,7 @@ export interface ExperimentsNormalized {
|
|
111
116
|
inlineConst?: boolean;
|
112
117
|
inlineEnum?: boolean;
|
113
118
|
typeReexportsPresence?: boolean;
|
119
|
+
lazyBarrel?: boolean;
|
114
120
|
nativeWatcher?: boolean;
|
115
121
|
}
|
116
122
|
export type IgnoreWarningsNormalized = ((warning: WebpackError, compilation: Compilation) => boolean)[];
|
@@ -143,6 +149,7 @@ export interface RspackOptionsNormalized {
|
|
143
149
|
optimization: Optimization;
|
144
150
|
plugins: Plugins;
|
145
151
|
experiments: ExperimentsNormalized;
|
152
|
+
lazyCompilation?: false | LazyCompilationOptions;
|
146
153
|
watch?: Watch;
|
147
154
|
watchOptions: WatchOptions;
|
148
155
|
devServer?: DevServer;
|
package/dist/config/types.d.ts
CHANGED
@@ -495,7 +495,10 @@ export type ResolveTsConfig = string | {
|
|
495
495
|
export type ResolveOptions = {
|
496
496
|
/** Path alias */
|
497
497
|
alias?: ResolveAlias;
|
498
|
-
/**
|
498
|
+
/**
|
499
|
+
* Specifies the condition names used to match entry points in the `exports` field of a package.
|
500
|
+
* @link https://nodejs.org/api/packages.html#packages_exports
|
501
|
+
*/
|
499
502
|
conditionNames?: string[];
|
500
503
|
/**
|
501
504
|
* Parse modules in order.
|
@@ -1968,6 +1971,7 @@ export type Experiments = {
|
|
1968
1971
|
cache?: ExperimentCacheOptions;
|
1969
1972
|
/**
|
1970
1973
|
* Enable lazy compilation.
|
1974
|
+
* @deprecated Please use the configuration top-level `lazyCompilation` option instead.
|
1971
1975
|
* @default false
|
1972
1976
|
*/
|
1973
1977
|
lazyCompilation?: boolean | LazyCompilationOptions;
|
@@ -2038,15 +2042,15 @@ export type Experiments = {
|
|
2038
2042
|
*/
|
2039
2043
|
useInputFileSystem?: UseInputFileSystem;
|
2040
2044
|
/**
|
2041
|
-
* Enable
|
2045
|
+
* Enable native watcher
|
2042
2046
|
* @default false
|
2043
2047
|
*/
|
2044
|
-
|
2048
|
+
nativeWatcher?: boolean;
|
2045
2049
|
/**
|
2046
|
-
* Enable
|
2050
|
+
* Enable inline const feature
|
2047
2051
|
* @default false
|
2048
2052
|
*/
|
2049
|
-
|
2053
|
+
inlineConst?: boolean;
|
2050
2054
|
/**
|
2051
2055
|
* Enable inline enum feature
|
2052
2056
|
* @default false
|
@@ -2057,6 +2061,11 @@ export type Experiments = {
|
|
2057
2061
|
* @default false
|
2058
2062
|
*/
|
2059
2063
|
typeReexportsPresence?: boolean;
|
2064
|
+
/**
|
2065
|
+
* Enable lazy make side effects free barrel file
|
2066
|
+
* @default false
|
2067
|
+
*/
|
2068
|
+
lazyBarrel?: boolean;
|
2060
2069
|
};
|
2061
2070
|
export type Watch = boolean;
|
2062
2071
|
/** Options for watch mode. */
|
@@ -2274,6 +2283,11 @@ export type RspackOptions = {
|
|
2274
2283
|
* Performance optimization options.
|
2275
2284
|
*/
|
2276
2285
|
performance?: Performance;
|
2286
|
+
/**
|
2287
|
+
* Enable lazy compilation.
|
2288
|
+
* @default false
|
2289
|
+
*/
|
2290
|
+
lazyCompilation?: boolean | LazyCompilationOptions;
|
2277
2291
|
};
|
2278
2292
|
/** Configuration for Rspack */
|
2279
2293
|
export type Configuration = RspackOptions;
|
@@ -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: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "
|
8
|
+
affectedHooks: "done" | "compilation" | "run" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
9
9
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
10
10
|
apply(compiler: import("..").Compiler): void;
|
11
11
|
};
|
package/dist/cssExtractLoader.js
CHANGED
@@ -82,64 +82,66 @@ let pitch = function(request, _, data) {
|
|
82
82
|
let options = this.getOptions(), emit = void 0 === options.emit || options.emit, callback = this.async(), filepath = this.resourcePath;
|
83
83
|
this.addDependency(filepath);
|
84
84
|
let { publicPath } = this._compilation.outputOptions;
|
85
|
-
"string" == typeof options.publicPath ? publicPath = options.publicPath : "function" == typeof options.publicPath && (publicPath = options.publicPath(this.resourcePath, this.rootContext)), "auto" === publicPath && (publicPath = AUTO_PUBLIC_PATH), publicPathForExtract = "string" == typeof publicPath ? /^[a-zA-Z][a-zA-Z\d+\-.]*?:/.test(publicPath) ? publicPath : `${ABSOLUTE_PUBLIC_PATH}${publicPath.replace(/\./g, SINGLE_DOT_PATH_SEGMENT)}` : publicPath
|
85
|
+
"string" == typeof options.publicPath ? publicPath = options.publicPath : "function" == typeof options.publicPath && (publicPath = options.publicPath(this.resourcePath, this.rootContext)), "auto" === publicPath && (publicPath = AUTO_PUBLIC_PATH), publicPathForExtract = "string" == typeof publicPath ? /^[a-zA-Z][a-zA-Z\d+\-.]*?:/.test(publicPath) ? publicPath : `${ABSOLUTE_PUBLIC_PATH}${publicPath.replace(/\./g, SINGLE_DOT_PATH_SEGMENT)}` : publicPath;
|
86
|
+
let handleExports = (originalExports)=>{
|
87
|
+
let locals, namedExport, esModule = void 0 === options.esModule || options.esModule, dependencies = [];
|
88
|
+
try {
|
89
|
+
let exports1 = originalExports.__esModule ? originalExports.default : originalExports;
|
90
|
+
if (namedExport = originalExports.__esModule && (!originalExports.default || !("locals" in originalExports.default))) for (let key of Object.keys(originalExports))"default" !== key && (locals || (locals = {}), locals[key] = originalExports[key]);
|
91
|
+
else locals = exports1?.locals;
|
92
|
+
if (Array.isArray(exports1) && emit) {
|
93
|
+
let identifierCountMap = new Map();
|
94
|
+
dependencies = exports1.map(([id, content, media, sourceMap, supports, layer])=>{
|
95
|
+
let context = this.rootContext, count = identifierCountMap.get(id) || 0;
|
96
|
+
return identifierCountMap.set(id, count + 1), {
|
97
|
+
identifier: id,
|
98
|
+
context,
|
99
|
+
content,
|
100
|
+
media,
|
101
|
+
supports,
|
102
|
+
layer,
|
103
|
+
identifierIndex: count,
|
104
|
+
sourceMap: sourceMap ? JSON.stringify(sourceMap) : void 0,
|
105
|
+
filepath
|
106
|
+
};
|
107
|
+
}).filter((item)=>null !== item);
|
108
|
+
}
|
109
|
+
} catch (e) {
|
110
|
+
callback(e);
|
111
|
+
return;
|
112
|
+
}
|
113
|
+
let result = function() {
|
114
|
+
if (locals) {
|
115
|
+
if (namedExport) {
|
116
|
+
let identifiers = Array.from(function*() {
|
117
|
+
let identifierId = 0;
|
118
|
+
for (let key of Object.keys(locals))identifierId += 1, yield [
|
119
|
+
`_${identifierId.toString(16)}`,
|
120
|
+
key
|
121
|
+
];
|
122
|
+
}()), localsString = identifiers.map(([id, key])=>{
|
123
|
+
var value;
|
124
|
+
return `\nvar ${id} = ${"function" == typeof (value = locals[key]) ? value.toString() : JSON.stringify(value)};`;
|
125
|
+
}).join(""), exportsString = `export { ${identifiers.map(([id, key])=>`${id} as ${JSON.stringify(key)}`).join(", ")} }`;
|
126
|
+
return void 0 !== options.defaultExport && options.defaultExport ? `${localsString}\n${exportsString}\nexport default { ${identifiers.map(([id, key])=>`${JSON.stringify(key)}: ${id}`).join(", ")} }\n` : `${localsString}\n${exportsString}\n`;
|
127
|
+
}
|
128
|
+
return `\n${esModule ? "export default" : "module.exports = "} ${JSON.stringify(locals)};`;
|
129
|
+
}
|
130
|
+
return esModule ? "\nexport {};" : "";
|
131
|
+
}(), resultSource = `// extracted by ${PLUGIN_NAME}`;
|
132
|
+
resultSource += this.hot && emit ? hotLoader(result, {
|
133
|
+
loaderContext: this,
|
134
|
+
options,
|
135
|
+
locals: locals
|
136
|
+
}) : result, dependencies.length > 0 && this.__internal__setParseMeta(PLUGIN_NAME, JSON.stringify(dependencies)), callback(null, resultSource, void 0, data);
|
137
|
+
};
|
138
|
+
this.importModule(`${this.resourcePath}.webpack[javascript/auto]!=!!!${request}`, {
|
86
139
|
layer: options.layer,
|
87
140
|
publicPath: publicPathForExtract,
|
88
141
|
baseUri: `${BASE_URI}/`
|
89
142
|
}, (error, exports1)=>{
|
90
143
|
if (error) return void callback(error);
|
91
|
-
(
|
92
|
-
let locals, namedExport, esModule = void 0 === options.esModule || options.esModule, dependencies = [];
|
93
|
-
try {
|
94
|
-
let exports1 = originalExports.__esModule ? originalExports.default : originalExports;
|
95
|
-
if (namedExport = originalExports.__esModule && (!originalExports.default || !("locals" in originalExports.default))) for (let key of Object.keys(originalExports))"default" !== key && (locals || (locals = {}), locals[key] = originalExports[key]);
|
96
|
-
else locals = exports1?.locals;
|
97
|
-
if (Array.isArray(exports1) && emit) {
|
98
|
-
let identifierCountMap = new Map();
|
99
|
-
dependencies = exports1.map(([id, content, media, sourceMap, supports, layer])=>{
|
100
|
-
let context = this.rootContext, count = identifierCountMap.get(id) || 0;
|
101
|
-
return identifierCountMap.set(id, count + 1), {
|
102
|
-
identifier: id,
|
103
|
-
context,
|
104
|
-
content,
|
105
|
-
media,
|
106
|
-
supports,
|
107
|
-
layer,
|
108
|
-
identifierIndex: count,
|
109
|
-
sourceMap: sourceMap ? JSON.stringify(sourceMap) : void 0,
|
110
|
-
filepath
|
111
|
-
};
|
112
|
-
}).filter((item)=>null !== item);
|
113
|
-
}
|
114
|
-
} catch (e) {
|
115
|
-
callback(e);
|
116
|
-
return;
|
117
|
-
}
|
118
|
-
let result = function() {
|
119
|
-
if (locals) {
|
120
|
-
if (namedExport) {
|
121
|
-
let identifiers = Array.from(function*() {
|
122
|
-
let identifierId = 0;
|
123
|
-
for (let key of Object.keys(locals))identifierId += 1, yield [
|
124
|
-
`_${identifierId.toString(16)}`,
|
125
|
-
key
|
126
|
-
];
|
127
|
-
}()), localsString = identifiers.map(([id, key])=>{
|
128
|
-
var value;
|
129
|
-
return `\nvar ${id} = ${"function" == typeof (value = locals[key]) ? value.toString() : JSON.stringify(value)};`;
|
130
|
-
}).join(""), exportsString = `export { ${identifiers.map(([id, key])=>`${id} as ${JSON.stringify(key)}`).join(", ")} }`;
|
131
|
-
return void 0 !== options.defaultExport && options.defaultExport ? `${localsString}\n${exportsString}\nexport default { ${identifiers.map(([id, key])=>`${JSON.stringify(key)}: ${id}`).join(", ")} }\n` : `${localsString}\n${exportsString}\n`;
|
132
|
-
}
|
133
|
-
return `\n${esModule ? "export default" : "module.exports = "} ${JSON.stringify(locals)};`;
|
134
|
-
}
|
135
|
-
return esModule ? "\nexport {};" : "";
|
136
|
-
}(), resultSource = `// extracted by ${PLUGIN_NAME}`;
|
137
|
-
resultSource += this.hot && emit ? hotLoader(result, {
|
138
|
-
loaderContext: this,
|
139
|
-
options,
|
140
|
-
locals: locals
|
141
|
-
}) : result, dependencies.length > 0 && this.__internal__setParseMeta(PLUGIN_NAME, JSON.stringify(dependencies)), callback(null, resultSource, void 0, data);
|
142
|
-
})(exports1);
|
144
|
+
handleExports(exports1);
|
143
145
|
});
|
144
146
|
}, css_extract_loader = function(content) {
|
145
147
|
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,7 +1,7 @@
|
|
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
6
|
export { Compiler } from "./Compiler";
|
7
7
|
export type { MultiCompilerOptions, MultiRspackOptions } from "./MultiCompiler";
|
@@ -134,6 +134,7 @@ export type { FeatureOptions as LightningcssFeatureOptions, LoaderOptions as Lig
|
|
134
134
|
export type { SwcLoaderEnvConfig, SwcLoaderEsParserConfig, SwcLoaderJscConfig, SwcLoaderModuleConfig, SwcLoaderOptions, SwcLoaderParserConfig, SwcLoaderTransformConfig, SwcLoaderTsParserConfig } from "./builtin-loader/swc/index";
|
135
135
|
export type { CircularDependencyRspackPluginOptions, CopyRspackPluginOptions, CssExtractRspackLoaderOptions, CssExtractRspackPluginOptions, EvalDevToolModulePluginOptions, HtmlRspackPluginOptions, LightningCssMinimizerRspackPluginOptions, RsdoctorPluginData, RsdoctorPluginHooks, SourceMapDevToolPluginOptions, SubresourceIntegrityPluginOptions, SwcJsMinimizerRspackPluginOptions } from "./builtin-plugin";
|
136
136
|
export { CircularDependencyRspackPlugin, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, HtmlRspackPlugin, LightningCssMinimizerRspackPlugin, SourceMapDevToolPlugin, SwcJsMinimizerRspackPlugin } from "./builtin-plugin";
|
137
|
+
import { EnforceExtension, ResolverFactory, async as resolveAsync, sync as resolveSync } from "@rspack/binding";
|
137
138
|
import { createNativePlugin } from "./builtin-plugin";
|
138
139
|
import { minify, minifySync, transform, transformSync } from "./swc";
|
139
140
|
interface Experiments {
|
@@ -153,7 +154,14 @@ interface Experiments {
|
|
153
154
|
transformSync: typeof transformSync;
|
154
155
|
minifySync: typeof minifySync;
|
155
156
|
};
|
157
|
+
resolver: {
|
158
|
+
ResolverFactory: typeof ResolverFactory;
|
159
|
+
EnforceExtension: typeof EnforceExtension;
|
160
|
+
async: typeof resolveAsync;
|
161
|
+
sync: typeof resolveSync;
|
162
|
+
};
|
156
163
|
CssChunkingPlugin: typeof CssChunkingPlugin;
|
157
164
|
createNativePlugin: typeof createNativePlugin;
|
158
165
|
}
|
159
166
|
export declare const experiments: Experiments;
|
167
|
+
export { VirtualModulesPlugin } from "./VirtualModulesPlugin";
|