@rspack-canary/browser 1.5.0-canary-0de3ce24-20250810153546 → 1.5.0-canary-e5e47098-20250820070851
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 +3 -3
- package/dist/Chunk.d.ts +3 -3
- package/dist/ChunkGraph.d.ts +2 -2
- package/dist/Chunks.d.ts +2 -2
- package/dist/Compilation.d.ts +3 -3
- package/dist/Compiler.d.ts +6 -1
- package/dist/ConcatenatedModule.d.ts +1 -1
- package/dist/ContextModule.d.ts +1 -1
- package/dist/Diagnostics.d.ts +1 -1
- package/dist/Entrypoint.d.ts +1 -1
- package/dist/ExportsInfo.d.ts +1 -1
- package/dist/ExternalModule.d.ts +1 -1
- package/dist/FileSystem.d.ts +1 -1
- package/dist/Module.d.ts +6 -17
- package/dist/ModuleGraph.d.ts +1 -1
- package/dist/NativeWatchFileSystem.d.ts +2 -1
- package/dist/NormalModule.d.ts +2 -2
- package/dist/NormalModuleFactory.d.ts +1 -1
- package/dist/Resolver.d.ts +1 -1
- package/dist/ResolverFactory.d.ts +1 -1
- package/dist/RspackError.d.ts +2 -2
- package/dist/RuntimeGlobals.d.ts +1 -1
- package/dist/RuntimeModule.d.ts +1 -1
- package/dist/VirtualModulesPlugin.d.ts +12 -0
- package/dist/binding.d.ts +8 -0
- package/dist/browser/service.d.ts +22 -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 +2 -2
- 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 +2 -2
- 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/DeterministicChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DllEntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +2 -2
- package/dist/builtin-plugin/DynamicEntryPlugin.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/EnableLibraryPlugin.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 +2 -2
- package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +2 -2
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +2 -2
- package/dist/builtin-plugin/ExternalsPlugin.d.ts +3 -2
- 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 -1
- package/dist/builtin-plugin/HotModuleReplacementPlugin.d.ts +1 -1
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/HttpUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/IgnorePlugin.d.ts +2 -2
- package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JavascriptModulesPlugin.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/MangleExportsPlugin.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/ModuleConcatenationPlugin.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/NaturalChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NaturalModuleIdsPlugin.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/NormalModuleReplacementPlugin.d.ts +10 -0
- package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +2 -2
- package/dist/builtin-plugin/ProgressPlugin.d.ts +2 -2
- 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 +2 -2
- package/dist/builtin-plugin/RslibPlugin.d.ts +2 -2
- package/dist/builtin-plugin/RstestPlugin.d.ts +2 -2
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +2 -2
- 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 +2 -2
- package/dist/builtin-plugin/SplitChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +2 -2
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +1 -1
- package/dist/builtin-plugin/WorkerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/base.d.ts +1 -1
- package/dist/builtin-plugin/css-extract/index.d.ts +1 -1
- package/dist/builtin-plugin/html-plugin/hooks.d.ts +1 -1
- package/dist/builtin-plugin/html-plugin/plugin.d.ts +2 -2
- package/dist/builtin-plugin/index.d.ts +1 -0
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -1
- package/dist/config/adapter.d.ts +1 -1
- package/dist/config/adapterRuleUse.d.ts +1 -1
- package/dist/config/types.d.ts +6 -1
- package/dist/container/ContainerPlugin.d.ts +1 -1
- package/dist/container/ContainerReferencePlugin.d.ts +1 -1
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
- package/dist/exports.d.ts +6 -5
- package/dist/index.mjs +350 -319
- package/dist/lib/DllReferencePlugin.d.ts +1 -1
- package/dist/lib/WebpackError.d.ts +1 -1
- package/dist/loader-runner/index.d.ts +1 -1
- package/dist/loader-runner/worker.d.ts +1 -1
- package/dist/napi-binding.d.ts +3069 -0
- package/dist/rspack.wasi-browser.js +2 -0
- package/dist/rspack.wasm32-wasi.wasm +0 -0
- package/dist/schema/config.d.ts +8 -4
- package/dist/schema/plugins.d.ts +1 -1
- package/dist/sharing/ConsumeSharedPlugin.d.ts +1 -1
- package/dist/sharing/ProvideSharedPlugin.d.ts +1 -1
- package/dist/sharing/ShareRuntimePlugin.d.ts +1 -1
- package/dist/stats/StatsFactory.d.ts +1 -1
- package/dist/stats/statsFactoryUtils.d.ts +2 -2
- package/dist/swc.d.ts +1 -1
- package/dist/taps/compilation.d.ts +1 -1
- package/dist/taps/types.d.ts +1 -1
- package/dist/util/SplitChunkSize.d.ts +1 -1
- package/dist/util/source.d.ts +1 -1
- package/package.json +6 -7
- package/dist/lib/NormalModuleReplacementPlugin.d.ts +0 -29
|
@@ -81,6 +81,8 @@ export const RawExternalItemFnCtx = __napiModule.exports.RawExternalItemFnCtx;
|
|
|
81
81
|
export const ReadonlyResourceData = __napiModule.exports.ReadonlyResourceData;
|
|
82
82
|
export const ResolverFactory = __napiModule.exports.ResolverFactory;
|
|
83
83
|
export const Sources = __napiModule.exports.Sources;
|
|
84
|
+
export const VirtualFileStore = __napiModule.exports.VirtualFileStore;
|
|
85
|
+
export const JsVirtualFileStore = __napiModule.exports.JsVirtualFileStore;
|
|
84
86
|
export const async = __napiModule.exports.async;
|
|
85
87
|
export const BuiltinPluginName = __napiModule.exports.BuiltinPluginName;
|
|
86
88
|
export const cleanupGlobalTrace = __napiModule.exports.cleanupGlobalTrace;
|
|
Binary file
|
package/dist/schema/config.d.ts
CHANGED
|
@@ -36,9 +36,9 @@ export declare const getRspackOptionsSchema: () => z.ZodObject<{
|
|
|
36
36
|
baseUri: z.ZodOptional<z.ZodString>;
|
|
37
37
|
chunkLoading: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodUnion<[z.ZodEnum<{
|
|
38
38
|
import: "import";
|
|
39
|
-
require: "require";
|
|
40
39
|
jsonp: "jsonp";
|
|
41
40
|
"import-scripts": "import-scripts";
|
|
41
|
+
require: "require";
|
|
42
42
|
"async-node": "async-node";
|
|
43
43
|
}>, z.ZodString]>]>>;
|
|
44
44
|
asyncChunks: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -218,16 +218,16 @@ export declare const getRspackOptionsSchema: () => z.ZodObject<{
|
|
|
218
218
|
chunkFormat: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodString]>>;
|
|
219
219
|
chunkLoading: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodUnion<[z.ZodEnum<{
|
|
220
220
|
import: "import";
|
|
221
|
-
require: "require";
|
|
222
221
|
jsonp: "jsonp";
|
|
223
222
|
"import-scripts": "import-scripts";
|
|
223
|
+
require: "require";
|
|
224
224
|
"async-node": "async-node";
|
|
225
225
|
}>, z.ZodString]>]>>;
|
|
226
226
|
enabledChunkLoadingTypes: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<{
|
|
227
227
|
import: "import";
|
|
228
|
-
require: "require";
|
|
229
228
|
jsonp: "jsonp";
|
|
230
229
|
"import-scripts": "import-scripts";
|
|
230
|
+
require: "require";
|
|
231
231
|
"async-node": "async-node";
|
|
232
232
|
}>, z.ZodString]>>>;
|
|
233
233
|
trustedTypes: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<true>, z.ZodString]>, z.ZodObject<{
|
|
@@ -249,9 +249,9 @@ export declare const getRspackOptionsSchema: () => z.ZodObject<{
|
|
|
249
249
|
asyncChunks: z.ZodOptional<z.ZodBoolean>;
|
|
250
250
|
workerChunkLoading: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodUnion<[z.ZodEnum<{
|
|
251
251
|
import: "import";
|
|
252
|
-
require: "require";
|
|
253
252
|
jsonp: "jsonp";
|
|
254
253
|
"import-scripts": "import-scripts";
|
|
254
|
+
require: "require";
|
|
255
255
|
"async-node": "async-node";
|
|
256
256
|
}>, z.ZodString]>]>>;
|
|
257
257
|
workerWasmLoading: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodUnion<[z.ZodEnum<{
|
|
@@ -737,6 +737,7 @@ export declare const getRspackOptionsSchema: () => z.ZodObject<{
|
|
|
737
737
|
url: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"relative">, z.ZodBoolean]>>;
|
|
738
738
|
exprContextCritical: z.ZodOptional<z.ZodBoolean>;
|
|
739
739
|
wrappedContextCritical: z.ZodOptional<z.ZodBoolean>;
|
|
740
|
+
unknownContextCritical: z.ZodOptional<z.ZodBoolean>;
|
|
740
741
|
wrappedContextRegExp: z.ZodOptional<z.ZodCustom<RegExp, RegExp>>;
|
|
741
742
|
exportsPresence: z.ZodOptional<z.ZodUnion<[z.ZodEnum<{
|
|
742
743
|
auto: "auto";
|
|
@@ -788,6 +789,7 @@ export declare const getRspackOptionsSchema: () => z.ZodObject<{
|
|
|
788
789
|
url: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"relative">, z.ZodBoolean]>>;
|
|
789
790
|
exprContextCritical: z.ZodOptional<z.ZodBoolean>;
|
|
790
791
|
wrappedContextCritical: z.ZodOptional<z.ZodBoolean>;
|
|
792
|
+
unknownContextCritical: z.ZodOptional<z.ZodBoolean>;
|
|
791
793
|
wrappedContextRegExp: z.ZodOptional<z.ZodCustom<RegExp, RegExp>>;
|
|
792
794
|
exportsPresence: z.ZodOptional<z.ZodUnion<[z.ZodEnum<{
|
|
793
795
|
auto: "auto";
|
|
@@ -839,6 +841,7 @@ export declare const getRspackOptionsSchema: () => z.ZodObject<{
|
|
|
839
841
|
url: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"relative">, z.ZodBoolean]>>;
|
|
840
842
|
exprContextCritical: z.ZodOptional<z.ZodBoolean>;
|
|
841
843
|
wrappedContextCritical: z.ZodOptional<z.ZodBoolean>;
|
|
844
|
+
unknownContextCritical: z.ZodOptional<z.ZodBoolean>;
|
|
842
845
|
wrappedContextRegExp: z.ZodOptional<z.ZodCustom<RegExp, RegExp>>;
|
|
843
846
|
exportsPresence: z.ZodOptional<z.ZodUnion<[z.ZodEnum<{
|
|
844
847
|
auto: "auto";
|
|
@@ -890,6 +893,7 @@ export declare const getRspackOptionsSchema: () => z.ZodObject<{
|
|
|
890
893
|
url: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"relative">, z.ZodBoolean]>>;
|
|
891
894
|
exprContextCritical: z.ZodOptional<z.ZodBoolean>;
|
|
892
895
|
wrappedContextCritical: z.ZodOptional<z.ZodBoolean>;
|
|
896
|
+
unknownContextCritical: z.ZodOptional<z.ZodBoolean>;
|
|
893
897
|
wrappedContextRegExp: z.ZodOptional<z.ZodCustom<RegExp, RegExp>>;
|
|
894
898
|
exportsPresence: z.ZodOptional<z.ZodUnion<[z.ZodEnum<{
|
|
895
899
|
auto: "auto";
|
package/dist/schema/plugins.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JsBuildMeta } from "
|
|
1
|
+
import type { JsBuildMeta } from "../binding";
|
|
2
2
|
import * as z from "zod/v4";
|
|
3
3
|
export declare const getIgnorePluginOptionsSchema: () => z.ZodUnion<readonly [z.ZodObject<{
|
|
4
4
|
contextRegExp: z.ZodOptional<z.ZodCustom<RegExp, RegExp>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BuiltinPlugin, BuiltinPluginName } from "
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from "../binding";
|
|
2
2
|
import { RspackBuiltinPlugin } from "../builtin-plugin/base";
|
|
3
3
|
import type { Compiler } from "../Compiler";
|
|
4
4
|
export type ConsumeSharedPluginOptions = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BuiltinPlugin, BuiltinPluginName, type RawProvideOptions } from "
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName, type RawProvideOptions } from "../binding";
|
|
2
2
|
import { RspackBuiltinPlugin } from "../builtin-plugin/base";
|
|
3
3
|
import type { Compiler } from "../Compiler";
|
|
4
4
|
export type ProvideSharedPluginOptions<Enhanced extends boolean = false> = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BuiltinPlugin, BuiltinPluginName } from "
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from "../binding";
|
|
2
2
|
import { RspackBuiltinPlugin } from "../builtin-plugin/base";
|
|
3
3
|
import type { Compiler } from "../Compiler";
|
|
4
4
|
export declare class ShareRuntimePlugin extends RspackBuiltinPlugin {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Copyright (c) JS Foundation and other contributors
|
|
8
8
|
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
9
|
*/
|
|
10
|
-
import type { JsStats, JsStatsCompilation, JsStatsError } from "
|
|
10
|
+
import type { JsStats, JsStatsCompilation, JsStatsError } from "../binding";
|
|
11
11
|
import { HookMap, SyncBailHook, SyncWaterfallHook } from "@rspack/lite-tapable";
|
|
12
12
|
import type { Compilation } from "../Compilation";
|
|
13
13
|
import { type GroupConfig } from "../util/smartGrouping";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type binding from "
|
|
2
|
-
import type { JsOriginRecord } from "
|
|
1
|
+
import type binding from "../binding";
|
|
2
|
+
import type { JsOriginRecord } from "../binding";
|
|
3
3
|
import type { Compilation } from "../Compilation";
|
|
4
4
|
import type { StatsOptions } from "../config";
|
|
5
5
|
import type { StatsFactory, StatsFactoryContext } from "./StatsFactory";
|
package/dist/swc.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TransformOutput } from "
|
|
1
|
+
import type { TransformOutput } from "./binding";
|
|
2
2
|
import type { JsMinifyOptions, Options as TransformOptions } from "@swc/types";
|
|
3
3
|
export type { TransformOutput, TransformOptions, JsMinifyOptions };
|
|
4
4
|
export declare function minify(source: string, options?: JsMinifyOptions): Promise<TransformOutput>;
|
package/dist/taps/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type binding from "
|
|
1
|
+
import type binding from "../binding";
|
|
2
2
|
import type * as liteTapable from "@rspack/lite-tapable";
|
|
3
3
|
import type { Compiler } from "../Compiler";
|
|
4
4
|
type CreateHookMapRegisterTaps = <H extends liteTapable.Hook<any, any, any>>(registerKind: binding.RegisterJsTapKind, getHookMap: () => liteTapable.HookMap<H>, createTap: (queried: liteTapable.QueriedHookMap<H>) => any) => (stages: number[]) => binding.JsTap[];
|
package/dist/util/source.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack-canary/browser",
|
|
3
|
-
"version": "1.5.0-canary-
|
|
3
|
+
"version": "1.5.0-canary-e5e47098-20250820070851",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Rspack for running in the browser. This is still in early stage and may not follow the semver.",
|
|
@@ -31,11 +31,10 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@napi-rs/wasm-runtime": "^1.0.1",
|
|
33
33
|
"@rspack/lite-tapable": "1.0.1",
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"@rspack/binding": "npm:@rspack-canary/binding@1.5.0-canary-0de3ce24-20250810153546"
|
|
34
|
+
"@swc/types": "0.1.24",
|
|
35
|
+
"@types/watchpack": "^2.4.4",
|
|
36
|
+
"memfs": "4.36.0",
|
|
37
|
+
"webpack-sources": "3.3.3"
|
|
39
38
|
},
|
|
40
39
|
"peerDependencies": {
|
|
41
40
|
"@swc/helpers": ">=0.5.1"
|
|
@@ -46,6 +45,6 @@
|
|
|
46
45
|
}
|
|
47
46
|
},
|
|
48
47
|
"scripts": {
|
|
49
|
-
"build": "pnpm run --fail-if-no-match --filter @rspack/core build:browser || pnpm --filter @rspack-canary/core build:browser"
|
|
48
|
+
"build": "pnpm run --fail-if-no-match --filter @rspack/core build:browser || pnpm --fail-if-no-match --filter @rspack-canary/core build:browser"
|
|
50
49
|
}
|
|
51
50
|
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The following code is modified based on
|
|
3
|
-
* https://github.com/webpack/webpack/blob/4b4ca3b/lib/NormalModuleReplacementPlugin.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 { Compiler } from "../Compiler";
|
|
11
|
-
import type { ResolveData } from "../Module";
|
|
12
|
-
type ModuleReplacer = (createData: ResolveData) => void;
|
|
13
|
-
export declare class NormalModuleReplacementPlugin {
|
|
14
|
-
readonly resourceRegExp: RegExp;
|
|
15
|
-
readonly newResource: string | ModuleReplacer;
|
|
16
|
-
/**
|
|
17
|
-
* Create an instance of the plugin
|
|
18
|
-
* @param resourceRegExp the resource matcher
|
|
19
|
-
* @param newResource the resource replacement
|
|
20
|
-
*/
|
|
21
|
-
constructor(resourceRegExp: RegExp, newResource: string | ModuleReplacer);
|
|
22
|
-
/**
|
|
23
|
-
* Apply the plugin
|
|
24
|
-
* @param compiler the compiler instance
|
|
25
|
-
* @returns
|
|
26
|
-
*/
|
|
27
|
-
apply(compiler: Compiler): void;
|
|
28
|
-
}
|
|
29
|
-
export {};
|