@rspack/core 1.0.0-alpha.5 → 1.0.0-beta.1
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/zod/index.d.ts +138 -52
- package/compiled/zod/index.js +300 -103
- package/compiled/zod/package.json +1 -1
- package/compiled/zod-validation-error/index.js +6 -6
- package/dist/Compilation.d.ts +22 -4
- package/dist/Compilation.js +64 -49
- package/dist/Compiler.d.ts +11 -10
- package/dist/Compiler.js +42 -42
- package/dist/ErrorHelpers.js +2 -4
- package/dist/Module.d.ts +1 -0
- package/dist/Module.js +3 -6
- package/dist/ModuleTypeConstants.d.ts +45 -69
- package/dist/ModuleTypeConstants.js +24 -77
- package/dist/NormalModule.d.ts +1 -0
- package/dist/NormalModule.js +1 -0
- package/dist/Stats.js +4 -6
- package/dist/Template.d.ts +31 -147
- package/dist/Template.js +40 -236
- package/dist/builtin-loader/lightningcss/index.d.ts +89 -0
- package/dist/builtin-loader/lightningcss/index.js +175 -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 +25 -49
- 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/CopyRspackPlugin.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/DefinePlugin.js +9 -13
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
- 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/EnableWasmLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EntryPlugin.d.ts +4 -3
- package/dist/builtin-plugin/EntryPlugin.js +1 -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 +29 -5
- package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FileUriPlugin.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/HtmlRspackPlugin.d.ts +9 -9
- 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/JavascriptModulesPlugin.d.ts +2 -2
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LightningCssMiminizerRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LightningCssMiminizerRspackPlugin.js +4 -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/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/NodeTargetPlugin.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/RemoveEmptyChunksPlugin.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/SplitChunksPlugin.js +5 -15
- package/dist/builtin-plugin/SwcCssMinimizerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.js +15 -23
- package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +1 -1
- package/dist/builtin-plugin/base.d.ts +1 -1
- package/dist/builtin-plugin/base.js +1 -3
- package/dist/builtin-plugin/css-extract/hmr/hotModuleReplacement.d.ts +3 -3
- package/dist/builtin-plugin/css-extract/hmr/hotModuleReplacement.js +17 -66
- package/dist/builtin-plugin/css-extract/hmr/normalizeUrl.d.ts +2 -0
- package/dist/builtin-plugin/css-extract/hmr/{normalize-url.js → normalizeUrl.js} +15 -24
- package/dist/builtin-plugin/css-extract/loader.d.ts +8 -3
- package/dist/builtin-plugin/css-extract/loader.js +28 -17
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -1
- package/dist/config/adapter.d.ts +1 -1
- package/dist/config/adapter.js +39 -25
- package/dist/config/adapterRuleUse.d.ts +5 -5
- package/dist/config/adapterRuleUse.js +23 -1
- package/dist/config/browserslistTargetHandler.d.ts +17 -15
- package/dist/config/browserslistTargetHandler.js +27 -33
- package/dist/config/defaults.js +27 -31
- package/dist/config/normalization.d.ts +8 -3
- package/dist/config/normalization.js +7 -5
- package/dist/config/target.d.ts +48 -109
- package/dist/config/target.js +50 -86
- package/dist/config/zod.d.ts +2660 -2305
- package/dist/config/zod.js +38 -19
- package/dist/container/ContainerPlugin.d.ts +7 -7
- package/dist/container/ContainerReferencePlugin.d.ts +1 -1
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
- package/dist/container/options.js +1 -1
- package/dist/exports.d.ts +4 -4
- package/dist/exports.js +2 -2
- package/dist/lib/AbstractMethodError.d.ts +12 -3
- package/dist/lib/AbstractMethodError.js +29 -21
- package/dist/lib/Cache.d.ts +40 -46
- package/dist/lib/Cache.js +43 -78
- package/dist/lib/CacheFacade.d.ts +119 -143
- package/dist/lib/CacheFacade.js +123 -123
- package/dist/lib/EntryOptionPlugin.d.ts +19 -2
- package/dist/lib/EntryOptionPlugin.js +22 -6
- package/dist/lib/EnvironmentPlugin.d.ts +17 -10
- package/dist/lib/EnvironmentPlugin.js +16 -15
- package/dist/lib/HookWebpackError.d.ts +27 -33
- package/dist/lib/HookWebpackError.js +33 -34
- package/dist/lib/IgnoreWarningsPlugin.d.ts +25 -0
- package/dist/lib/{ignoreWarningsPlugin.js → IgnoreWarningsPlugin.js} +17 -0
- package/dist/lib/LoaderOptionsPlugin.d.ts +18 -9
- package/dist/lib/LoaderOptionsPlugin.js +38 -14
- package/dist/lib/LoaderTargetPlugin.d.ts +17 -8
- package/dist/lib/LoaderTargetPlugin.js +17 -15
- package/dist/lib/ModuleFilenameHelpers.d.ts +10 -1
- package/dist/lib/ModuleFilenameHelpers.js +10 -3
- package/dist/lib/NormalModuleReplacementPlugin.d.ts +15 -5
- package/dist/lib/NormalModuleReplacementPlugin.js +15 -5
- package/dist/lib/WebpackError.d.ts +29 -22
- package/dist/lib/WebpackError.js +17 -29
- package/dist/lib/cache/getLazyHashedEtag.d.ts +24 -24
- package/dist/lib/cache/getLazyHashedEtag.js +20 -23
- package/dist/lib/cache/mergeEtags.d.ts +15 -9
- package/dist/lib/cache/mergeEtags.js +23 -22
- package/dist/lib/formatLocation.d.ts +13 -8
- package/dist/lib/formatLocation.js +20 -20
- package/dist/loader-runner/LoaderLoadingError.d.ts +11 -1
- package/dist/loader-runner/LoaderLoadingError.js +3 -5
- package/dist/loader-runner/index.js +7 -9
- package/dist/loader-runner/loadLoader.d.ts +11 -2
- package/dist/loader-runner/loadLoader.js +17 -19
- package/dist/logging/createConsoleLogger.js +2 -6
- package/dist/logging/truncateArgs.js +5 -9
- package/dist/node/nodeConsole.js +1 -3
- package/dist/rspackOptionsApply.js +2 -2
- package/dist/stats/DefaultStatsFactoryPlugin.js +18 -8
- package/dist/stats/DefaultStatsPresetPlugin.js +4 -4
- package/dist/stats/DefaultStatsPrinterPlugin.js +11 -16
- package/dist/stats/StatsFactory.js +13 -17
- package/dist/stats/StatsPrinter.js +7 -9
- package/dist/util/AssetInfo.js +11 -7
- package/dist/util/SplitChunkSize.js +1 -1
- package/dist/util/cleverMerge.d.ts +33 -57
- package/dist/util/cleverMerge.js +89 -145
- package/dist/util/comparators.d.ts +1 -1
- package/dist/util/comparators.js +3 -5
- package/dist/util/createHash.d.ts +4 -3
- package/dist/util/createHash.js +31 -45
- package/dist/util/fs.js +9 -13
- package/dist/util/hash/BatchedHash.d.ts +24 -9
- package/dist/util/hash/BatchedHash.js +16 -13
- package/dist/util/hash/index.d.ts +9 -9
- package/dist/util/hash/index.js +14 -11
- package/dist/util/hash/md4.d.ts +29 -2
- package/dist/util/hash/md4.js +7 -3
- package/dist/util/hash/wasm-hash.d.ts +52 -5
- package/dist/util/hash/wasm-hash.js +19 -22
- package/dist/util/hash/xxhash64.d.ts +29 -2
- package/dist/util/hash/xxhash64.js +7 -3
- package/dist/util/identifier.js +9 -15
- package/dist/util/index.js +1 -1
- package/dist/util/memoize.js +7 -9
- package/package.json +9 -8
- package/compiled/enhanced-resolve/index.js +0 -5566
- package/dist/builtin-plugin/css-extract/hmr/normalize-url.d.ts +0 -2
- package/dist/lib/ignoreWarningsPlugin.d.ts +0 -7
|
@@ -3,7 +3,7 @@ export declare const FlagDependencyUsagePlugin: {
|
|
|
3
3
|
new (global: boolean): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [global: boolean];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -17,13 +17,13 @@ declare const htmlRspackPluginOptions: z.ZodObject<{
|
|
|
17
17
|
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
|
|
18
18
|
}, "strict", z.ZodTypeAny, {
|
|
19
19
|
filename?: string | undefined;
|
|
20
|
+
publicPath?: string | undefined;
|
|
21
|
+
chunks?: string[] | undefined;
|
|
20
22
|
template?: string | undefined;
|
|
21
23
|
templateContent?: string | undefined;
|
|
22
24
|
templateParameters?: Record<string, string> | undefined;
|
|
23
25
|
inject?: boolean | "head" | "body" | undefined;
|
|
24
|
-
publicPath?: string | undefined;
|
|
25
26
|
scriptLoading?: "module" | "blocking" | "defer" | undefined;
|
|
26
|
-
chunks?: string[] | undefined;
|
|
27
27
|
excludedChunks?: string[] | undefined;
|
|
28
28
|
sri?: "sha256" | "sha384" | "sha512" | undefined;
|
|
29
29
|
minify?: boolean | undefined;
|
|
@@ -32,13 +32,13 @@ declare const htmlRspackPluginOptions: z.ZodObject<{
|
|
|
32
32
|
meta?: Record<string, string | Record<string, string>> | undefined;
|
|
33
33
|
}, {
|
|
34
34
|
filename?: string | undefined;
|
|
35
|
+
publicPath?: string | undefined;
|
|
36
|
+
chunks?: string[] | undefined;
|
|
35
37
|
template?: string | undefined;
|
|
36
38
|
templateContent?: string | undefined;
|
|
37
39
|
templateParameters?: Record<string, string> | undefined;
|
|
38
40
|
inject?: boolean | "head" | "body" | undefined;
|
|
39
|
-
publicPath?: string | undefined;
|
|
40
41
|
scriptLoading?: "module" | "blocking" | "defer" | undefined;
|
|
41
|
-
chunks?: string[] | undefined;
|
|
42
42
|
excludedChunks?: string[] | undefined;
|
|
43
43
|
sri?: "sha256" | "sha384" | "sha512" | undefined;
|
|
44
44
|
minify?: boolean | undefined;
|
|
@@ -50,13 +50,13 @@ export type HtmlRspackPluginOptions = z.infer<typeof htmlRspackPluginOptions>;
|
|
|
50
50
|
export declare const HtmlRspackPlugin: {
|
|
51
51
|
new (c?: {
|
|
52
52
|
filename?: string | undefined;
|
|
53
|
+
publicPath?: string | undefined;
|
|
54
|
+
chunks?: string[] | undefined;
|
|
53
55
|
template?: string | undefined;
|
|
54
56
|
templateContent?: string | undefined;
|
|
55
57
|
templateParameters?: Record<string, string> | undefined;
|
|
56
58
|
inject?: boolean | "head" | "body" | undefined;
|
|
57
|
-
publicPath?: string | undefined;
|
|
58
59
|
scriptLoading?: "module" | "blocking" | "defer" | undefined;
|
|
59
|
-
chunks?: string[] | undefined;
|
|
60
60
|
excludedChunks?: string[] | undefined;
|
|
61
61
|
sri?: "sha256" | "sha384" | "sha512" | undefined;
|
|
62
62
|
minify?: boolean | undefined;
|
|
@@ -67,13 +67,13 @@ export declare const HtmlRspackPlugin: {
|
|
|
67
67
|
name: BuiltinPluginName;
|
|
68
68
|
_args: [c?: {
|
|
69
69
|
filename?: string | undefined;
|
|
70
|
+
publicPath?: string | undefined;
|
|
71
|
+
chunks?: string[] | undefined;
|
|
70
72
|
template?: string | undefined;
|
|
71
73
|
templateContent?: string | undefined;
|
|
72
74
|
templateParameters?: Record<string, string> | undefined;
|
|
73
75
|
inject?: boolean | "head" | "body" | undefined;
|
|
74
|
-
publicPath?: string | undefined;
|
|
75
76
|
scriptLoading?: "module" | "blocking" | "defer" | undefined;
|
|
76
|
-
chunks?: string[] | undefined;
|
|
77
77
|
excludedChunks?: string[] | undefined;
|
|
78
78
|
sri?: "sha256" | "sha384" | "sha512" | undefined;
|
|
79
79
|
minify?: boolean | undefined;
|
|
@@ -81,7 +81,7 @@ export declare const HtmlRspackPlugin: {
|
|
|
81
81
|
favicon?: string | undefined;
|
|
82
82
|
meta?: Record<string, string | Record<string, string>> | undefined;
|
|
83
83
|
} | undefined];
|
|
84
|
-
affectedHooks: "done" | "
|
|
84
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
85
85
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
86
86
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
87
87
|
};
|
|
@@ -3,7 +3,7 @@ export declare const HttpExternalsRspackPlugin: {
|
|
|
3
3
|
new (css: boolean, webAsync: boolean): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [css: boolean, webAsync: boolean];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -9,7 +9,7 @@ export declare const IgnorePlugin: {
|
|
|
9
9
|
new (options: IgnorePluginOptions): {
|
|
10
10
|
name: BuiltinPluginName;
|
|
11
11
|
_args: [options: IgnorePluginOptions];
|
|
12
|
-
affectedHooks: "done" | "
|
|
12
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
13
13
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
14
14
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
15
15
|
};
|
|
@@ -3,7 +3,7 @@ export declare const InferAsyncModulesPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
|
|
2
2
|
import * as liteTapable from "@rspack/lite-tapable";
|
|
3
|
+
import type { Chunk } from "../Chunk";
|
|
3
4
|
import { Compilation } from "../Compilation";
|
|
5
|
+
import type Hash from "../util/hash";
|
|
4
6
|
import { RspackBuiltinPlugin } from "./base";
|
|
5
|
-
import Hash = require("../util/hash");
|
|
6
|
-
import type { Chunk } from "../Chunk";
|
|
7
7
|
export type CompilationHooks = {
|
|
8
8
|
chunkHash: liteTapable.SyncHook<[Chunk, Hash]>;
|
|
9
9
|
};
|
|
@@ -4,7 +4,7 @@ export declare const JsLoaderRspackPlugin: {
|
|
|
4
4
|
new (compiler: Compiler): {
|
|
5
5
|
name: BuiltinPluginName;
|
|
6
6
|
_args: [compiler: Compiler];
|
|
7
|
-
affectedHooks: "done" | "
|
|
7
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
8
8
|
raw(compiler: Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
9
9
|
apply(compiler: Compiler): void;
|
|
10
10
|
};
|
|
@@ -3,7 +3,7 @@ export declare const JsonModulesPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -4,7 +4,7 @@ export declare const LightningCssMinimizerRspackPlugin: {
|
|
|
4
4
|
new (options?: Partial<RawLightningCssMinimizerRspackPluginOptions> | undefined): {
|
|
5
5
|
name: BuiltinPluginName;
|
|
6
6
|
_args: [options?: Partial<RawLightningCssMinimizerRspackPluginOptions> | undefined];
|
|
7
|
-
affectedHooks: "done" | "
|
|
7
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
8
8
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
9
9
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
10
10
|
};
|
|
@@ -8,6 +8,9 @@ exports.LightningCssMinimizerRspackPlugin = (0, base_1.create)(binding_1.Builtin
|
|
|
8
8
|
errorRecovery: options?.errorRecovery ?? true,
|
|
9
9
|
unusedSymbols: options?.unusedSymbols ?? [],
|
|
10
10
|
removeUnusedLocalIdents: options?.removeUnusedLocalIdents ?? true,
|
|
11
|
-
browserslist: options?.browserslist ?? ["defaults"]
|
|
11
|
+
browserslist: options?.browserslist ?? ["defaults"],
|
|
12
|
+
test: options?.test,
|
|
13
|
+
include: options?.include,
|
|
14
|
+
exclude: options?.exclude
|
|
12
15
|
};
|
|
13
16
|
});
|
|
@@ -8,7 +8,7 @@ export declare const LimitChunkCountPlugin: {
|
|
|
8
8
|
new (options: LimitChunkCountOptions): {
|
|
9
9
|
name: BuiltinPluginName;
|
|
10
10
|
_args: [options: LimitChunkCountOptions];
|
|
11
|
-
affectedHooks: "done" | "
|
|
11
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
12
12
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
13
13
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
14
14
|
};
|
|
@@ -3,7 +3,7 @@ export declare const MangleExportsPlugin: {
|
|
|
3
3
|
new (deterministic: boolean): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [deterministic: boolean];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const MergeDuplicateChunksPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const ModuleChunkFormatPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const ModuleConcatenationPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const NamedChunkIdsPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const NamedModuleIdsPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const NaturalChunkIdsPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const NaturalModuleIdsPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const NodeTargetPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -4,7 +4,7 @@ export declare const ProgressPlugin: {
|
|
|
4
4
|
new (progress?: ProgressPluginArgument): {
|
|
5
5
|
name: BuiltinPluginName;
|
|
6
6
|
_args: [progress?: ProgressPluginArgument];
|
|
7
|
-
affectedHooks: "done" | "
|
|
7
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
8
8
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
9
9
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
10
10
|
};
|
|
@@ -4,7 +4,7 @@ export declare const ProvidePlugin: {
|
|
|
4
4
|
new (provide: ProvidePluginOptions): {
|
|
5
5
|
name: BuiltinPluginName;
|
|
6
6
|
_args: [provide: ProvidePluginOptions];
|
|
7
|
-
affectedHooks: "done" | "
|
|
7
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
8
8
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
9
9
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
10
10
|
};
|
|
@@ -3,7 +3,7 @@ export declare const RealContentHashPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const RemoveEmptyChunksPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -4,7 +4,7 @@ export declare const RuntimeChunkPlugin: {
|
|
|
4
4
|
new (options: RawRuntimeChunkOptions): {
|
|
5
5
|
name: BuiltinPluginName;
|
|
6
6
|
_args: [options: RawRuntimeChunkOptions];
|
|
7
|
-
affectedHooks: "done" | "
|
|
7
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
8
8
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
9
9
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
10
10
|
};
|
|
@@ -3,7 +3,7 @@ export declare const RuntimePlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const SideEffectsFlagPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -13,7 +13,7 @@ export declare const SizeLimitsPlugin: {
|
|
|
13
13
|
maxAssetSize?: number | undefined;
|
|
14
14
|
maxEntrypointSize?: number | undefined;
|
|
15
15
|
}];
|
|
16
|
-
affectedHooks: "done" | "
|
|
16
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
17
17
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
18
18
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
19
19
|
};
|
|
@@ -16,7 +16,7 @@ export declare const SourceMapDevToolPlugin: {
|
|
|
16
16
|
new (options: SourceMapDevToolPluginOptions): {
|
|
17
17
|
name: BuiltinPluginName;
|
|
18
18
|
_args: [options: SourceMapDevToolPluginOptions];
|
|
19
|
-
affectedHooks: "done" | "
|
|
19
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
20
20
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
21
21
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
22
22
|
};
|
|
@@ -34,14 +34,10 @@ function toRawSplitChunksOptions(sc, compiler) {
|
|
|
34
34
|
if (typeof ctx.module === "undefined") {
|
|
35
35
|
return name(undefined);
|
|
36
36
|
}
|
|
37
|
-
|
|
38
|
-
return name(Module_1.Module.__from_binding(ctx.module, compiler._lastCompilation), getChunks(ctx.chunks), ctx.cacheGroupKey);
|
|
39
|
-
}
|
|
37
|
+
return name(Module_1.Module.__from_binding(ctx.module, compiler._lastCompilation), getChunks(ctx.chunks), ctx.cacheGroupKey);
|
|
40
38
|
};
|
|
41
39
|
}
|
|
42
|
-
|
|
43
|
-
return name;
|
|
44
|
-
}
|
|
40
|
+
return name;
|
|
45
41
|
}
|
|
46
42
|
function getTest(test) {
|
|
47
43
|
if (typeof test === "function") {
|
|
@@ -49,22 +45,16 @@ function toRawSplitChunksOptions(sc, compiler) {
|
|
|
49
45
|
if (typeof ctx.module === "undefined") {
|
|
50
46
|
return test(undefined);
|
|
51
47
|
}
|
|
52
|
-
|
|
53
|
-
return test(Module_1.Module.__from_binding(ctx.module, compiler._lastCompilation));
|
|
54
|
-
}
|
|
48
|
+
return test(Module_1.Module.__from_binding(ctx.module, compiler._lastCompilation));
|
|
55
49
|
};
|
|
56
50
|
}
|
|
57
|
-
|
|
58
|
-
return test;
|
|
59
|
-
}
|
|
51
|
+
return test;
|
|
60
52
|
}
|
|
61
53
|
function getChunks(chunks) {
|
|
62
54
|
if (typeof chunks === "function") {
|
|
63
55
|
return (chunk) => chunks(Chunk_1.Chunk.__from_binding(chunk, compiler._lastCompilation.__internal_getInner()));
|
|
64
56
|
}
|
|
65
|
-
|
|
66
|
-
return chunks;
|
|
67
|
-
}
|
|
57
|
+
return chunks;
|
|
68
58
|
}
|
|
69
59
|
const { name, chunks, defaultSizeTypes, cacheGroups = {}, fallbackCacheGroup, minSize, maxSize, maxAsyncSize, maxInitialSize, ...passThrough } = sc;
|
|
70
60
|
return {
|
|
@@ -10,7 +10,7 @@ export declare const SwcCssMinimizerRspackPlugin: {
|
|
|
10
10
|
new (options?: SwcCssMinimizerRspackPluginOptions | undefined): {
|
|
11
11
|
name: BuiltinPluginName;
|
|
12
12
|
_args: [options?: SwcCssMinimizerRspackPluginOptions | undefined];
|
|
13
|
-
affectedHooks: "done" | "
|
|
13
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
14
14
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
15
15
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
16
16
|
};
|
|
@@ -204,7 +204,7 @@ export declare const SwcJsMinimizerRspackPlugin: {
|
|
|
204
204
|
new (options?: SwcJsMinimizerRspackPluginOptions | undefined): {
|
|
205
205
|
name: BuiltinPluginName;
|
|
206
206
|
_args: [options?: SwcJsMinimizerRspackPluginOptions | undefined];
|
|
207
|
-
affectedHooks: "done" | "
|
|
207
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
208
208
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
209
209
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
210
210
|
};
|
|
@@ -13,46 +13,38 @@ function getRawExtractCommentsOptions(extractComments) {
|
|
|
13
13
|
// copied from terser-webpack-plugin
|
|
14
14
|
return "@preserve|@lic|@cc_on|^\\**!";
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
if (condition === false) {
|
|
17
17
|
throw Error("unreachable");
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return condition.source;
|
|
22
|
-
}
|
|
19
|
+
// FIXME: flags
|
|
20
|
+
return condition.source;
|
|
23
21
|
};
|
|
24
22
|
if (typeof extractComments === "boolean") {
|
|
25
23
|
if (!extractComments) {
|
|
26
24
|
return undefined;
|
|
27
25
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return res;
|
|
33
|
-
}
|
|
26
|
+
const res = {
|
|
27
|
+
condition: conditionStr(extractComments)
|
|
28
|
+
};
|
|
29
|
+
return res;
|
|
34
30
|
}
|
|
35
|
-
|
|
31
|
+
if (extractComments instanceof RegExp) {
|
|
36
32
|
const res = {
|
|
37
33
|
condition: extractComments.source
|
|
38
34
|
};
|
|
39
35
|
return res;
|
|
40
36
|
}
|
|
41
|
-
|
|
37
|
+
if (isObject(extractComments)) {
|
|
42
38
|
if (extractComments.condition === false) {
|
|
43
39
|
return undefined;
|
|
44
40
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return res;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
return undefined;
|
|
41
|
+
const res = {
|
|
42
|
+
condition: conditionStr(extractComments.condition),
|
|
43
|
+
banner: extractComments.banner
|
|
44
|
+
};
|
|
45
|
+
return res;
|
|
55
46
|
}
|
|
47
|
+
return undefined;
|
|
56
48
|
}
|
|
57
49
|
exports.SwcJsMinimizerRspackPlugin = (0, base_1.create)(binding_1.BuiltinPluginName.SwcJsMinimizerRspackPlugin, (options) => {
|
|
58
50
|
let compress = options?.compress ?? true;
|
|
@@ -3,7 +3,7 @@ export declare const WarnCaseSensitiveModulesPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const WebWorkerTemplatePlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_args: [];
|
|
6
|
-
affectedHooks: "done" | "
|
|
6
|
+
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|