@rspack/core 1.2.1 → 1.2.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/dist/builtin-plugin/RuntimePlugin.d.ts +22 -4
- package/dist/exports.d.ts +1 -0
- package/dist/index.js +408 -322
- package/package.json +3 -3
|
@@ -1,10 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as binding from "@rspack/binding";
|
|
2
|
+
import * as liteTapable from "@rspack/lite-tapable";
|
|
3
|
+
import { Chunk } from "../Chunk";
|
|
4
|
+
import { Compilation } from "../Compilation";
|
|
5
|
+
import type { CreatePartialRegisters } from "../taps/types";
|
|
6
|
+
export declare const RuntimePluginImpl: {
|
|
3
7
|
new (): {
|
|
4
|
-
name: BuiltinPluginName;
|
|
8
|
+
name: binding.BuiltinPluginName;
|
|
5
9
|
_args: [];
|
|
6
10
|
affectedHooks: "done" | "environment" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
|
7
|
-
raw(compiler: import("..").Compiler):
|
|
11
|
+
raw(compiler: import("..").Compiler): binding.BuiltinPlugin;
|
|
8
12
|
apply(compiler: import("..").Compiler): void;
|
|
9
13
|
};
|
|
10
14
|
};
|
|
15
|
+
export type RuntimePluginHooks = {
|
|
16
|
+
createScript: liteTapable.SyncWaterfallHook<[string, Chunk]>;
|
|
17
|
+
linkPreload: liteTapable.SyncWaterfallHook<[string, Chunk]>;
|
|
18
|
+
linkPrefetch: liteTapable.SyncWaterfallHook<[string, Chunk]>;
|
|
19
|
+
};
|
|
20
|
+
declare const RuntimePlugin: typeof RuntimePluginImpl & {
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Use `getCompilationHooks` instead.
|
|
23
|
+
*/
|
|
24
|
+
getHooks: (compilation: Compilation) => RuntimePluginHooks;
|
|
25
|
+
getCompilationHooks: (compilation: Compilation) => RuntimePluginHooks;
|
|
26
|
+
};
|
|
27
|
+
export declare const createRuntimePluginHooksRegisters: CreatePartialRegisters<`RuntimePlugin`>;
|
|
28
|
+
export { RuntimePlugin };
|
package/dist/exports.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ export { ExternalsPlugin } from "./builtin-plugin";
|
|
|
58
58
|
export { HotModuleReplacementPlugin } from "./builtin-plugin";
|
|
59
59
|
export { NoEmitOnErrorsPlugin } from "./builtin-plugin";
|
|
60
60
|
export { WarnCaseSensitiveModulesPlugin } from "./builtin-plugin";
|
|
61
|
+
export { RuntimePlugin } from "./builtin-plugin";
|
|
61
62
|
export { DllPlugin, type DllPluginOptions } from "./lib/DllPlugin";
|
|
62
63
|
export { DllReferencePlugin, type DllReferencePluginOptions, type DllReferencePluginOptionsSourceType, type DllReferencePluginOptionsContent, type DllReferencePluginOptionsManifest } from "./lib/DllReferencePlugin";
|
|
63
64
|
export { EnvironmentPlugin } from "./lib/EnvironmentPlugin";
|