@rspack/core 0.5.7-canary-9e2ce60-20240320055406 → 0.5.8-canary-6b6429d-20240321010409
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/Chunk.d.ts +2 -0
- package/dist/Chunk.js +4 -0
- package/dist/Compilation.d.ts +16 -17
- package/dist/Compilation.js +10 -10
- package/dist/Compiler.js +57 -78
- package/dist/Module.d.ts +3 -0
- package/dist/Module.js +12 -0
- package/dist/Watching.d.ts +0 -1
- package/dist/Watching.js +0 -3
- 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/CopyRspackPlugin.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/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 +1 -1
- 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 +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 +1 -1
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
- 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/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/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/RuntimePlugin.d.ts +1 -1
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SwcCssMinimizerPlugin.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/WebWorkerTemplatePlugin.d.ts +1 -1
- package/dist/builtin-plugin/base.d.ts +1 -1
- package/dist/builtin-plugin/base.js +1 -1
- package/dist/builtin-plugin/index.d.ts +0 -1
- package/dist/builtin-plugin/index.js +0 -1
- package/dist/config/normalization.d.ts +2 -2
- package/dist/config/normalization.js +1 -2
- package/dist/config/zod.d.ts +16 -109
- package/dist/config/zod.js +1 -8
- package/dist/exports.d.ts +13 -25
- package/dist/rspackOptionsApply.js +1 -12
- package/package.json +5 -5
- package/dist/builtin-plugin/lazy-compilation/backend.d.ts +0 -52
- package/dist/builtin-plugin/lazy-compilation/backend.js +0 -143
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +0 -30
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.js +0 -6
- package/dist/builtin-plugin/lazy-compilation/plugin.d.ts +0 -13
- package/dist/builtin-plugin/lazy-compilation/plugin.js +0 -60
- package/dist/util/normalization.d.ts +0 -5
- package/dist/util/normalization.js +0 -9
package/dist/Chunk.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type JsChunk, type JsCompilation } from "@rspack/binding";
|
|
2
2
|
import { ChunkGroup } from "./ChunkGroup";
|
|
3
|
+
import { Compilation } from ".";
|
|
3
4
|
export declare class Chunk {
|
|
4
5
|
#private;
|
|
5
6
|
name?: string;
|
|
@@ -15,6 +16,7 @@ export declare class Chunk {
|
|
|
15
16
|
renderedHash?: string;
|
|
16
17
|
chunkReasons: Array<string>;
|
|
17
18
|
auxiliaryFiles: Array<string>;
|
|
19
|
+
static __from_binding(chunk: JsChunk, compilation: Compilation): Chunk;
|
|
18
20
|
static __from_binding(chunk: JsChunk, compilation: JsCompilation): Chunk;
|
|
19
21
|
constructor(chunk: JsChunk, compilation: JsCompilation);
|
|
20
22
|
isOnlyInitial(): boolean;
|
package/dist/Chunk.js
CHANGED
|
@@ -16,8 +16,12 @@ exports.Chunk = void 0;
|
|
|
16
16
|
const binding_1 = require("@rspack/binding");
|
|
17
17
|
const ChunkGroup_1 = require("./ChunkGroup");
|
|
18
18
|
const comparators_1 = require("./util/comparators");
|
|
19
|
+
const _1 = require(".");
|
|
19
20
|
class Chunk {
|
|
20
21
|
static __from_binding(chunk, compilation) {
|
|
22
|
+
if (compilation instanceof _1.Compilation) {
|
|
23
|
+
return new Chunk(chunk, compilation.__internal_getInner());
|
|
24
|
+
}
|
|
21
25
|
return new Chunk(chunk, compilation);
|
|
22
26
|
}
|
|
23
27
|
constructor(chunk, compilation) {
|
package/dist/Compilation.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import * as tapable from "tapable";
|
|
12
12
|
import { Source } from "webpack-sources";
|
|
13
|
-
import type { ExternalObject, JsAssetInfo,
|
|
13
|
+
import type { ExternalObject, JsAssetInfo, JsCompatSource, JsCompilation, JsModule, JsRuntimeModule, JsStatsChunk, JsStatsError, PathData } from "@rspack/binding";
|
|
14
14
|
import { RspackOptionsNormalized, StatsOptions, OutputNormalized, StatsValue, RspackPluginInstance } from "./config";
|
|
15
15
|
import * as liteTapable from "./lite-tapable";
|
|
16
16
|
import { ContextModuleFactory } from "./ContextModuleFactory";
|
|
@@ -21,10 +21,9 @@ import { NormalModuleFactory } from "./NormalModuleFactory";
|
|
|
21
21
|
import { Stats } from "./Stats";
|
|
22
22
|
import { StatsFactory } from "./stats/StatsFactory";
|
|
23
23
|
import { StatsPrinter } from "./stats/StatsPrinter";
|
|
24
|
-
import { NormalizedJsModule } from "./util/normalization";
|
|
25
24
|
import MergeCaller from "./util/MergeCaller";
|
|
26
25
|
import { Chunk } from "./Chunk";
|
|
27
|
-
import { CodeGenerationResult } from "./Module";
|
|
26
|
+
import { CodeGenerationResult, Module } from "./Module";
|
|
28
27
|
import { ChunkGraph } from "./ChunkGraph";
|
|
29
28
|
import { Entrypoint } from "./Entrypoint";
|
|
30
29
|
export type AssetInfo = Partial<JsAssetInfo> & Record<string, any>;
|
|
@@ -68,29 +67,29 @@ export declare class Compilation {
|
|
|
68
67
|
childCompiler: tapable.SyncHook<[Compiler, string, number]>;
|
|
69
68
|
log: tapable.SyncBailHook<[string, LogEntry], true>;
|
|
70
69
|
additionalAssets: any;
|
|
71
|
-
optimizeModules: tapable.SyncBailHook<Iterable<
|
|
72
|
-
afterOptimizeModules: tapable.SyncHook<Iterable<
|
|
70
|
+
optimizeModules: tapable.SyncBailHook<Iterable<Module>, void>;
|
|
71
|
+
afterOptimizeModules: tapable.SyncHook<Iterable<Module>, void>;
|
|
73
72
|
optimizeTree: tapable.AsyncSeriesBailHook<[
|
|
74
73
|
Iterable<Chunk>,
|
|
75
|
-
Iterable<
|
|
74
|
+
Iterable<Module>
|
|
76
75
|
], void>;
|
|
77
76
|
optimizeChunkModules: tapable.AsyncSeriesBailHook<[
|
|
78
77
|
Iterable<Chunk>,
|
|
79
|
-
Iterable<
|
|
78
|
+
Iterable<Module>
|
|
80
79
|
], void>;
|
|
81
|
-
finishModules: tapable.AsyncSeriesHook<[Iterable<
|
|
82
|
-
chunkAsset:
|
|
80
|
+
finishModules: tapable.AsyncSeriesHook<[Iterable<Module>], void>;
|
|
81
|
+
chunkAsset: liteTapable.SyncHook<[Chunk, string], void>;
|
|
83
82
|
processWarnings: tapable.SyncWaterfallHook<[Error[]]>;
|
|
84
|
-
succeedModule:
|
|
85
|
-
stillValidModule:
|
|
83
|
+
succeedModule: liteTapable.SyncHook<[Module], void>;
|
|
84
|
+
stillValidModule: liteTapable.SyncHook<[Module], void>;
|
|
86
85
|
statsFactory: tapable.SyncHook<[StatsFactory, StatsOptions], void>;
|
|
87
86
|
statsPrinter: tapable.SyncHook<[StatsPrinter, StatsOptions], void>;
|
|
88
|
-
buildModule:
|
|
89
|
-
executeModule:
|
|
87
|
+
buildModule: liteTapable.SyncHook<[Module]>;
|
|
88
|
+
executeModule: liteTapable.SyncHook<[
|
|
90
89
|
ExecuteModuleArgument,
|
|
91
90
|
ExecuteModuleContext
|
|
92
91
|
]>;
|
|
93
|
-
runtimeModule:
|
|
92
|
+
runtimeModule: liteTapable.SyncHook<[JsRuntimeModule, Chunk], void>;
|
|
94
93
|
};
|
|
95
94
|
options: RspackOptionsNormalized;
|
|
96
95
|
outputOptions: OutputNormalized;
|
|
@@ -226,7 +225,7 @@ export declare class Compilation {
|
|
|
226
225
|
add: (dep: string) => void;
|
|
227
226
|
addAll: (deps: Iterable<string>) => void;
|
|
228
227
|
};
|
|
229
|
-
get modules():
|
|
228
|
+
get modules(): Module[];
|
|
230
229
|
get chunks(): Chunk[];
|
|
231
230
|
/**
|
|
232
231
|
* Get the named chunks.
|
|
@@ -266,8 +265,8 @@ export declare class Compilation {
|
|
|
266
265
|
__internal__getChunks(): Chunk[];
|
|
267
266
|
getStats(): Stats;
|
|
268
267
|
createChildCompiler(name: string, outputOptions: OutputNormalized, plugins: RspackPluginInstance[]): Compiler;
|
|
269
|
-
_rebuildModuleCaller: MergeCaller<[string, (err:
|
|
270
|
-
rebuildModule(m:
|
|
268
|
+
_rebuildModuleCaller: MergeCaller<[string, (err: Error, m: Module) => void]>;
|
|
269
|
+
rebuildModule(m: Module, f: (err: Error, m: Module) => void): void;
|
|
271
270
|
/**
|
|
272
271
|
* Get the `Source` of a given asset filename.
|
|
273
272
|
*
|
package/dist/Compilation.js
CHANGED
|
@@ -59,10 +59,10 @@ const StatsPrinter_1 = require("./stats/StatsPrinter");
|
|
|
59
59
|
const util_1 = require("./util");
|
|
60
60
|
const createSource_1 = require("./util/createSource");
|
|
61
61
|
const fake_1 = require("./util/fake");
|
|
62
|
-
const normalization_1 = require("./util/normalization");
|
|
63
62
|
const MergeCaller_1 = __importDefault(require("./util/MergeCaller"));
|
|
64
63
|
const memoize_1 = require("./util/memoize");
|
|
65
64
|
const Chunk_1 = require("./Chunk");
|
|
65
|
+
const Module_1 = require("./Module");
|
|
66
66
|
const ChunkGraph_1 = require("./ChunkGraph");
|
|
67
67
|
const Entrypoint_1 = require("./Entrypoint");
|
|
68
68
|
class Compilation {
|
|
@@ -85,7 +85,7 @@ class Compilation {
|
|
|
85
85
|
for (const [id, callback] of args) {
|
|
86
86
|
const m = modules.find(item => item.moduleIdentifier === id);
|
|
87
87
|
if (m) {
|
|
88
|
-
callback(err, m);
|
|
88
|
+
callback(err, Module_1.Module.__from_binding(m));
|
|
89
89
|
}
|
|
90
90
|
else {
|
|
91
91
|
callback(err || new Error("module no found"), null);
|
|
@@ -146,15 +146,15 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
146
146
|
"modules"
|
|
147
147
|
]),
|
|
148
148
|
finishModules: new tapable.AsyncSeriesHook(["modules"]),
|
|
149
|
-
chunkAsset: new
|
|
149
|
+
chunkAsset: new liteTapable.SyncHook(["chunk", "filename"]),
|
|
150
150
|
processWarnings: new tapable.SyncWaterfallHook(["warnings"]),
|
|
151
|
-
succeedModule: new
|
|
152
|
-
stillValidModule: new
|
|
151
|
+
succeedModule: new liteTapable.SyncHook(["module"]),
|
|
152
|
+
stillValidModule: new liteTapable.SyncHook(["module"]),
|
|
153
153
|
statsFactory: new tapable.SyncHook(["statsFactory", "options"]),
|
|
154
154
|
statsPrinter: new tapable.SyncHook(["statsPrinter", "options"]),
|
|
155
|
-
buildModule: new
|
|
156
|
-
executeModule: new
|
|
157
|
-
runtimeModule: new
|
|
155
|
+
buildModule: new liteTapable.SyncHook(["module"]),
|
|
156
|
+
executeModule: new liteTapable.SyncHook(["options", "context"]),
|
|
157
|
+
runtimeModule: new liteTapable.SyncHook(["module", "chunk"])
|
|
158
158
|
};
|
|
159
159
|
this.compiler = compiler;
|
|
160
160
|
this.resolverFactory = compiler.resolverFactory;
|
|
@@ -549,7 +549,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
549
549
|
}
|
|
550
550
|
get modules() {
|
|
551
551
|
return (0, memoize_1.memoizeValue)(() => {
|
|
552
|
-
return this.__internal__getModules().map(item =>
|
|
552
|
+
return this.__internal__getModules().map(item => Module_1.Module.__from_binding(item));
|
|
553
553
|
});
|
|
554
554
|
}
|
|
555
555
|
// FIXME: This is not aligned with Webpack.
|
|
@@ -644,7 +644,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
644
644
|
return this.compiler.createChildCompiler(this, name, idx, outputOptions, plugins);
|
|
645
645
|
}
|
|
646
646
|
rebuildModule(m, f) {
|
|
647
|
-
this._rebuildModuleCaller.push([m.
|
|
647
|
+
this._rebuildModuleCaller.push([m.identifier(), f]);
|
|
648
648
|
}
|
|
649
649
|
/**
|
|
650
650
|
* Get the `Source` of a given asset filename.
|
package/dist/Compiler.js
CHANGED
|
@@ -36,7 +36,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
36
36
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
38
|
};
|
|
39
|
-
var _Compiler_instances, _Compiler_instance, _Compiler_disabledHooks, _Compiler_moduleExecutionResultsMap, _Compiler_getInstance, _Compiler_updateDisabledHooks, _Compiler_finishMake,
|
|
39
|
+
var _Compiler_instances, _Compiler_instance, _Compiler_disabledHooks, _Compiler_moduleExecutionResultsMap, _Compiler_getInstance, _Compiler_updateDisabledHooks, _Compiler_finishMake, _Compiler_afterProcessAssets, _Compiler_afterResolve, _Compiler_contextModuleFactoryBeforeResolve, _Compiler_contextModuleFactoryAfterResolve, _Compiler_normalModuleFactoryCreateModule, _Compiler_normalModuleFactoryResolveForScheme, _Compiler_optimizeChunkModules, _Compiler_optimizeTree, _Compiler_optimizeModules, _Compiler_afterOptimizeModules, _Compiler_finishModules, _Compiler_emit, _Compiler_assetEmitted, _Compiler_afterEmit, _Compiler_decorateUpdateDisabledHooks, _Compiler_createRegisterTaps, _Compiler_createCompilation, _Compiler_resetThisCompilation, _Compiler_newCompilationParams;
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
41
|
exports.Compiler = void 0;
|
|
42
42
|
const index_1 = require("./index");
|
|
@@ -44,12 +44,12 @@ const fs_1 = __importDefault(require("fs"));
|
|
|
44
44
|
const tapable = __importStar(require("tapable"));
|
|
45
45
|
const liteTapable = __importStar(require("./lite-tapable"));
|
|
46
46
|
const tapable_1 = require("tapable");
|
|
47
|
+
const config_1 = require("./config");
|
|
47
48
|
const RuleSetCompiler_1 = require("./RuleSetCompiler");
|
|
48
49
|
const Stats_1 = require("./Stats");
|
|
49
50
|
const Compilation_1 = require("./Compilation");
|
|
50
51
|
const ContextModuleFactory_1 = require("./ContextModuleFactory");
|
|
51
52
|
const ResolverFactory_1 = __importDefault(require("./ResolverFactory"));
|
|
52
|
-
const config_1 = require("./config");
|
|
53
53
|
const ConcurrentCompilationError_1 = __importDefault(require("./error/ConcurrentCompilationError"));
|
|
54
54
|
const fileSystem_1 = require("./fileSystem");
|
|
55
55
|
const Cache_1 = __importDefault(require("./lib/Cache"));
|
|
@@ -59,7 +59,6 @@ const NormalModuleFactory_1 = require("./NormalModuleFactory");
|
|
|
59
59
|
const bindingVersionCheck_1 = require("./util/bindingVersionCheck");
|
|
60
60
|
const Watching_1 = require("./Watching");
|
|
61
61
|
const NormalModule_1 = require("./NormalModule");
|
|
62
|
-
const normalization_1 = require("./util/normalization");
|
|
63
62
|
const builtin_plugin_1 = require("./builtin-plugin");
|
|
64
63
|
const rspackOptionsApply_1 = require("./rspackOptionsApply");
|
|
65
64
|
const defaults_1 = require("./config/defaults");
|
|
@@ -69,6 +68,7 @@ const HookWebpackError_1 = require("./lib/HookWebpackError");
|
|
|
69
68
|
const Module_1 = require("./Module");
|
|
70
69
|
const base_1 = require("./builtin-plugin/base");
|
|
71
70
|
const ExecuteModulePlugin_1 = __importDefault(require("./ExecuteModulePlugin"));
|
|
71
|
+
const Chunk_1 = require("./Chunk");
|
|
72
72
|
class Compiler {
|
|
73
73
|
constructor(context, options) {
|
|
74
74
|
_Compiler_instances.add(this);
|
|
@@ -515,15 +515,9 @@ _Compiler_instance = new WeakMap(), _Compiler_disabledHooks = new WeakMap(), _Co
|
|
|
515
515
|
finishModules: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_finishModules).bind(this),
|
|
516
516
|
normalModuleFactoryCreateModule: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_normalModuleFactoryCreateModule).bind(this),
|
|
517
517
|
normalModuleFactoryResolveForScheme: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_normalModuleFactoryResolveForScheme).bind(this),
|
|
518
|
-
chunkAsset: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_chunkAsset).bind(this),
|
|
519
518
|
afterResolve: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_afterResolve).bind(this),
|
|
520
519
|
contextModuleFactoryBeforeResolve: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_contextModuleFactoryBeforeResolve).bind(this),
|
|
521
|
-
contextModuleFactoryAfterResolve: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_contextModuleFactoryAfterResolve).bind(this)
|
|
522
|
-
succeedModule: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_succeedModule).bind(this),
|
|
523
|
-
stillValidModule: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_stillValidModule).bind(this),
|
|
524
|
-
buildModule: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_buildModule).bind(this),
|
|
525
|
-
executeModule: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_executeModule).bind(this),
|
|
526
|
-
runtimeModule: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_runtimeModule).bind(this)
|
|
520
|
+
contextModuleFactoryAfterResolve: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_contextModuleFactoryAfterResolve).bind(this)
|
|
527
521
|
}, {
|
|
528
522
|
registerCompilerThisCompilationTaps: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_createRegisterTaps).call(this, () => this.hooks.thisCompilation, queried => (native) => {
|
|
529
523
|
if (this.compilation === undefined) {
|
|
@@ -534,6 +528,58 @@ _Compiler_instance = new WeakMap(), _Compiler_disabledHooks = new WeakMap(), _Co
|
|
|
534
528
|
registerCompilerCompilationTaps: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_createRegisterTaps).call(this, () => this.hooks.compilation, queried => () => queried.call(this.compilation, this.compilationParams)),
|
|
535
529
|
registerCompilerMakeTaps: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_createRegisterTaps).call(this, () => this.hooks.make, queried => async () => await queried.promise(this.compilation)),
|
|
536
530
|
registerCompilerShouldEmitTaps: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_createRegisterTaps).call(this, () => this.hooks.shouldEmit, queried => () => queried.call(this.compilation)),
|
|
531
|
+
registerCompilationRuntimeModuleTaps: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_createRegisterTaps).call(this, () => this.compilation.hooks.runtimeModule, queried => ({ module, chunk }) => {
|
|
532
|
+
var _a, _b;
|
|
533
|
+
const originSource = (_a = module.source) === null || _a === void 0 ? void 0 : _a.source;
|
|
534
|
+
queried.call(module, Chunk_1.Chunk.__from_binding(chunk, this.compilation));
|
|
535
|
+
const newSource = (_b = module.source) === null || _b === void 0 ? void 0 : _b.source;
|
|
536
|
+
if (newSource && newSource !== originSource) {
|
|
537
|
+
return module;
|
|
538
|
+
}
|
|
539
|
+
return;
|
|
540
|
+
}),
|
|
541
|
+
registerCompilationBuildModuleTaps: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_createRegisterTaps).call(this, () => this.compilation.hooks.buildModule, queired => (m) => queired.call(Module_1.Module.__from_binding(m))),
|
|
542
|
+
registerCompilationStillValidModuleTaps: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_createRegisterTaps).call(this, () => this.compilation.hooks.stillValidModule, queired => (m) => queired.call(Module_1.Module.__from_binding(m))),
|
|
543
|
+
registerCompilationSucceedModuleTaps: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_createRegisterTaps).call(this, () => this.compilation.hooks.succeedModule, queired => (m) => queired.call(Module_1.Module.__from_binding(m))),
|
|
544
|
+
registerCompilationExecuteModuleTaps: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_createRegisterTaps).call(this, () => this.compilation.hooks.executeModule, queried => ({ entry, id, codegenResults, runtimeModules }) => {
|
|
545
|
+
const __webpack_require__ = (id) => {
|
|
546
|
+
const cached = moduleCache[id];
|
|
547
|
+
if (cached !== undefined) {
|
|
548
|
+
if (cached.error)
|
|
549
|
+
throw cached.error;
|
|
550
|
+
return cached.exports;
|
|
551
|
+
}
|
|
552
|
+
var execOptions = {
|
|
553
|
+
id,
|
|
554
|
+
module: {
|
|
555
|
+
id,
|
|
556
|
+
exports: {},
|
|
557
|
+
loaded: false,
|
|
558
|
+
error: undefined
|
|
559
|
+
},
|
|
560
|
+
require: __webpack_require__
|
|
561
|
+
};
|
|
562
|
+
interceptModuleExecution.forEach((handler) => handler(execOptions));
|
|
563
|
+
const result = codegenResults.map[id]["build time"];
|
|
564
|
+
const moduleObject = execOptions.module;
|
|
565
|
+
if (id)
|
|
566
|
+
moduleCache[id] = moduleObject;
|
|
567
|
+
(0, HookWebpackError_1.tryRunOrWebpackError)(() => queried.call({
|
|
568
|
+
codeGenerationResult: new Module_1.CodeGenerationResult(result),
|
|
569
|
+
moduleObject
|
|
570
|
+
}, { __webpack_require__ }), "Compilation.hooks.executeModule");
|
|
571
|
+
moduleObject.loaded = true;
|
|
572
|
+
return moduleObject.exports;
|
|
573
|
+
};
|
|
574
|
+
const moduleCache = (__webpack_require__[RuntimeGlobals_1.RuntimeGlobals.moduleCache.replace(`${RuntimeGlobals_1.RuntimeGlobals.require}.`, "")] = {});
|
|
575
|
+
const interceptModuleExecution = (__webpack_require__[RuntimeGlobals_1.RuntimeGlobals.interceptModuleExecution.replace(`${RuntimeGlobals_1.RuntimeGlobals.require}.`, "")] = []);
|
|
576
|
+
for (const runtimeModule of runtimeModules) {
|
|
577
|
+
__webpack_require__(runtimeModule);
|
|
578
|
+
}
|
|
579
|
+
const executeResult = __webpack_require__(entry);
|
|
580
|
+
__classPrivateFieldGet(this, _Compiler_moduleExecutionResultsMap, "f").set(id, executeResult);
|
|
581
|
+
}),
|
|
582
|
+
registerCompilationChunkAssetTaps: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_createRegisterTaps).call(this, () => this.compilation.hooks.chunkAsset, queried => ({ chunk, filename }) => queried.call(Chunk_1.Chunk.__from_binding(chunk, this.compilation), filename)),
|
|
537
583
|
registerCompilationProcessAssetsTaps: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_createRegisterTaps).call(this, () => this.compilation.hooks.processAssets, queried => async () => await queried.promise(this.compilation.assets)),
|
|
538
584
|
registerNormalModuleFactoryBeforeResolveTaps: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_createRegisterTaps).call(this, () => this.compilationParams.normalModuleFactory.hooks.beforeResolve, queried => async (resolveData) => {
|
|
539
585
|
const normalizedResolveData = {
|
|
@@ -563,18 +609,12 @@ _Compiler_instance = new WeakMap(), _Compiler_disabledHooks = new WeakMap(), _Co
|
|
|
563
609
|
finishModules: this.compilation.hooks.finishModules,
|
|
564
610
|
optimizeModules: this.compilation.hooks.optimizeModules,
|
|
565
611
|
afterOptimizeModules: this.compilation.hooks.afterOptimizeModules,
|
|
566
|
-
chunkAsset: this.compilation.hooks.chunkAsset,
|
|
567
612
|
afterResolve: (_a = this.compilationParams) === null || _a === void 0 ? void 0 : _a.normalModuleFactory.hooks.afterResolve,
|
|
568
|
-
succeedModule: this.compilation.hooks.succeedModule,
|
|
569
|
-
stillValidModule: this.compilation.hooks.stillValidModule,
|
|
570
|
-
buildModule: this.compilation.hooks.buildModule,
|
|
571
613
|
optimizeChunkModules: this.compilation.hooks.optimizeChunkModules,
|
|
572
614
|
contextModuleFactoryBeforeResolve: (_b = this.compilationParams) === null || _b === void 0 ? void 0 : _b.contextModuleFactory.hooks.beforeResolve,
|
|
573
615
|
contextModuleFactoryAfterResolve: (_c = this.compilationParams) === null || _c === void 0 ? void 0 : _c.contextModuleFactory.hooks.afterResolve,
|
|
574
616
|
normalModuleFactoryCreateModule: (_d = this.compilationParams) === null || _d === void 0 ? void 0 : _d.normalModuleFactory.hooks.createModule,
|
|
575
|
-
normalModuleFactoryResolveForScheme: (_e = this.compilationParams) === null || _e === void 0 ? void 0 : _e.normalModuleFactory.hooks.resolveForScheme
|
|
576
|
-
executeModule: undefined,
|
|
577
|
-
runtimeModule: this.compilation.hooks.runtimeModule
|
|
617
|
+
normalModuleFactoryResolveForScheme: (_e = this.compilationParams) === null || _e === void 0 ? void 0 : _e.normalModuleFactory.hooks.resolveForScheme
|
|
578
618
|
};
|
|
579
619
|
for (const [name, hook] of Object.entries(hookMap)) {
|
|
580
620
|
if (typeof hook !== "undefined" &&
|
|
@@ -599,10 +639,6 @@ _Compiler_instance = new WeakMap(), _Compiler_disabledHooks = new WeakMap(), _Co
|
|
|
599
639
|
}, _Compiler_finishMake = async function _Compiler_finishMake() {
|
|
600
640
|
await this.hooks.finishMake.promise(this.compilation);
|
|
601
641
|
__classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_updateDisabledHooks).call(this);
|
|
602
|
-
}, _Compiler_buildModule = async function _Compiler_buildModule(module) {
|
|
603
|
-
const normalized = (0, normalization_1.normalizeJsModule)(module);
|
|
604
|
-
this.compilation.hooks.buildModule.call(normalized);
|
|
605
|
-
__classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_updateDisabledHooks).call(this);
|
|
606
642
|
}, _Compiler_afterProcessAssets = async function _Compiler_afterProcessAssets() {
|
|
607
643
|
await this.compilation.hooks.afterProcessAssets.promise(this.compilation.assets);
|
|
608
644
|
__classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_updateDisabledHooks).call(this);
|
|
@@ -652,9 +688,6 @@ _Compiler_instance = new WeakMap(), _Compiler_disabledHooks = new WeakMap(), _Co
|
|
|
652
688
|
}, _Compiler_afterOptimizeModules = async function _Compiler_afterOptimizeModules() {
|
|
653
689
|
await this.compilation.hooks.afterOptimizeModules.promise(this.compilation.modules);
|
|
654
690
|
__classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_updateDisabledHooks).call(this);
|
|
655
|
-
}, _Compiler_chunkAsset = function _Compiler_chunkAsset(assetArg) {
|
|
656
|
-
this.compilation.hooks.chunkAsset.call(assetArg.chunk, assetArg.filename);
|
|
657
|
-
__classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_updateDisabledHooks).call(this);
|
|
658
691
|
}, _Compiler_finishModules = async function _Compiler_finishModules() {
|
|
659
692
|
await this.compilation.hooks.finishModules.promise(this.compilation.modules);
|
|
660
693
|
__classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_updateDisabledHooks).call(this);
|
|
@@ -681,60 +714,6 @@ _Compiler_instance = new WeakMap(), _Compiler_disabledHooks = new WeakMap(), _Co
|
|
|
681
714
|
}, _Compiler_afterEmit = async function _Compiler_afterEmit() {
|
|
682
715
|
await this.hooks.afterEmit.promise(this.compilation);
|
|
683
716
|
__classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_updateDisabledHooks).call(this);
|
|
684
|
-
}, _Compiler_succeedModule = function _Compiler_succeedModule(module) {
|
|
685
|
-
this.compilation.hooks.succeedModule.call(module);
|
|
686
|
-
__classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_updateDisabledHooks).call(this);
|
|
687
|
-
}, _Compiler_stillValidModule = function _Compiler_stillValidModule(module) {
|
|
688
|
-
this.compilation.hooks.stillValidModule.call(module);
|
|
689
|
-
__classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_updateDisabledHooks).call(this);
|
|
690
|
-
}, _Compiler_runtimeModule = function _Compiler_runtimeModule(arg) {
|
|
691
|
-
var _a, _b;
|
|
692
|
-
let { module, chunk } = arg;
|
|
693
|
-
const originSource = (_a = module.source) === null || _a === void 0 ? void 0 : _a.source;
|
|
694
|
-
this.compilation.hooks.runtimeModule.call(module, chunk);
|
|
695
|
-
__classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_updateDisabledHooks).call(this);
|
|
696
|
-
const newSource = (_b = module.source) === null || _b === void 0 ? void 0 : _b.source;
|
|
697
|
-
if (newSource && newSource !== originSource) {
|
|
698
|
-
return module;
|
|
699
|
-
}
|
|
700
|
-
return;
|
|
701
|
-
}, _Compiler_executeModule = async function _Compiler_executeModule({ entry, request, options, runtimeModules, codegenResults, id }) {
|
|
702
|
-
const __webpack_require__ = (id) => {
|
|
703
|
-
const cached = moduleCache[id];
|
|
704
|
-
if (cached !== undefined) {
|
|
705
|
-
if (cached.error)
|
|
706
|
-
throw cached.error;
|
|
707
|
-
return cached.exports;
|
|
708
|
-
}
|
|
709
|
-
var execOptions = {
|
|
710
|
-
id,
|
|
711
|
-
module: {
|
|
712
|
-
id,
|
|
713
|
-
exports: {},
|
|
714
|
-
loaded: false,
|
|
715
|
-
error: undefined
|
|
716
|
-
},
|
|
717
|
-
require: __webpack_require__
|
|
718
|
-
};
|
|
719
|
-
interceptModuleExecution.forEach((handler) => handler(execOptions));
|
|
720
|
-
const result = codegenResults.map[id]["build time"];
|
|
721
|
-
const moduleObject = execOptions.module;
|
|
722
|
-
if (id)
|
|
723
|
-
moduleCache[id] = moduleObject;
|
|
724
|
-
(0, HookWebpackError_1.tryRunOrWebpackError)(() => this.compilation.hooks.executeModule.call({
|
|
725
|
-
codeGenerationResult: new Module_1.CodeGenerationResult(result),
|
|
726
|
-
moduleObject
|
|
727
|
-
}, { __webpack_require__ }), "Compilation.hooks.executeModule");
|
|
728
|
-
moduleObject.loaded = true;
|
|
729
|
-
return moduleObject.exports;
|
|
730
|
-
};
|
|
731
|
-
const moduleCache = (__webpack_require__[RuntimeGlobals_1.RuntimeGlobals.moduleCache.replace(`${RuntimeGlobals_1.RuntimeGlobals.require}.`, "")] = {});
|
|
732
|
-
const interceptModuleExecution = (__webpack_require__[RuntimeGlobals_1.RuntimeGlobals.interceptModuleExecution.replace(`${RuntimeGlobals_1.RuntimeGlobals.require}.`, "")] = []);
|
|
733
|
-
for (const runtimeModule of runtimeModules) {
|
|
734
|
-
__webpack_require__(runtimeModule);
|
|
735
|
-
}
|
|
736
|
-
const executeResult = __webpack_require__(entry);
|
|
737
|
-
__classPrivateFieldGet(this, _Compiler_moduleExecutionResultsMap, "f").set(id, executeResult);
|
|
738
717
|
}, _Compiler_decorateUpdateDisabledHooks = function _Compiler_decorateUpdateDisabledHooks(jsTaps) {
|
|
739
718
|
if (jsTaps.length > 0) {
|
|
740
719
|
const last = jsTaps[jsTaps.length - 1];
|
package/dist/Module.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { JsCodegenerationResult, JsCodegenerationResults, JsModule } from "@rspack/binding";
|
|
2
|
+
import { Source } from "webpack-sources";
|
|
2
3
|
export declare class Module {
|
|
3
4
|
#private;
|
|
5
|
+
_originalSource?: Source;
|
|
4
6
|
static __from_binding(module: JsModule): Module;
|
|
5
7
|
constructor(module: JsModule);
|
|
6
8
|
get context(): string | undefined;
|
|
7
9
|
get resource(): string | undefined;
|
|
10
|
+
get originalSource(): Source | null;
|
|
8
11
|
identifier(): string;
|
|
9
12
|
nameForCondition(): string | null;
|
|
10
13
|
}
|
package/dist/Module.js
CHANGED
|
@@ -13,6 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
var _Module_inner, _CodeGenerationResult_inner, _CodeGenerationResults_inner;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.CodeGenerationResults = exports.CodeGenerationResult = exports.Module = void 0;
|
|
16
|
+
const createSource_1 = require("./util/createSource");
|
|
16
17
|
class Module {
|
|
17
18
|
static __from_binding(module) {
|
|
18
19
|
return new Module(module);
|
|
@@ -27,6 +28,17 @@ class Module {
|
|
|
27
28
|
get resource() {
|
|
28
29
|
return __classPrivateFieldGet(this, _Module_inner, "f").resource;
|
|
29
30
|
}
|
|
31
|
+
get originalSource() {
|
|
32
|
+
if (this._originalSource)
|
|
33
|
+
return this._originalSource;
|
|
34
|
+
if (__classPrivateFieldGet(this, _Module_inner, "f").originalSource) {
|
|
35
|
+
this._originalSource = (0, createSource_1.createSourceFromRaw)(__classPrivateFieldGet(this, _Module_inner, "f").originalSource);
|
|
36
|
+
return this._originalSource;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
30
42
|
identifier() {
|
|
31
43
|
return __classPrivateFieldGet(this, _Module_inner, "f").moduleIdentifier;
|
|
32
44
|
}
|
package/dist/Watching.d.ts
CHANGED
|
@@ -33,7 +33,6 @@ export declare class Watching {
|
|
|
33
33
|
watch(files: Iterable<string>, dirs: Iterable<string>, missing: Iterable<string>): void;
|
|
34
34
|
close(callback?: () => void): void;
|
|
35
35
|
invalidate(callback?: Callback<Error, void>): void;
|
|
36
|
-
lazyCompilationInvalidate(files: Set<string>): void;
|
|
37
36
|
/**
|
|
38
37
|
* The reason why this is _done instead of #done, is that in Webpack,
|
|
39
38
|
* it will rewrite this function to another function
|
package/dist/Watching.js
CHANGED
|
@@ -150,9 +150,6 @@ class Watching {
|
|
|
150
150
|
this.onChange();
|
|
151
151
|
__classPrivateFieldGet(this, _Watching_instances, "m", _Watching_invalidate).call(this);
|
|
152
152
|
}
|
|
153
|
-
lazyCompilationInvalidate(files) {
|
|
154
|
-
__classPrivateFieldGet(this, _Watching_instances, "m", _Watching_invalidate).call(this, new Map(), new Map(), files, new Set());
|
|
155
|
-
}
|
|
156
153
|
_done(error, compilation) {
|
|
157
154
|
this.running = false;
|
|
158
155
|
let stats = undefined;
|
|
@@ -3,7 +3,7 @@ export declare const ArrayPushCallbackChunkFormatPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_options: void;
|
|
6
|
-
affectedHooks: "
|
|
6
|
+
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishModules" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const AssetModulesPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_options: void;
|
|
6
|
-
affectedHooks: "
|
|
6
|
+
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishModules" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const AsyncWebAssemblyModulesPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_options: void;
|
|
6
|
-
affectedHooks: "
|
|
6
|
+
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishModules" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -176,7 +176,7 @@ export declare const BannerPlugin: {
|
|
|
176
176
|
}): {
|
|
177
177
|
name: BuiltinPluginName;
|
|
178
178
|
_options: RawBannerPluginOptions;
|
|
179
|
-
affectedHooks: "
|
|
179
|
+
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishModules" | "finishMake" | "entryOption" | undefined;
|
|
180
180
|
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
181
181
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
182
182
|
};
|
|
@@ -7,7 +7,7 @@ export declare const BundlerInfoRspackPlugin: {
|
|
|
7
7
|
new (options: BundleInfoOptions): {
|
|
8
8
|
name: BuiltinPluginName;
|
|
9
9
|
_options: RawBundlerInfoPluginOptions;
|
|
10
|
-
affectedHooks: "
|
|
10
|
+
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishModules" | "finishMake" | "entryOption" | undefined;
|
|
11
11
|
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
12
12
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
13
13
|
};
|
|
@@ -3,7 +3,7 @@ export declare const ChunkPrefetchPreloadPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_options: void;
|
|
6
|
-
affectedHooks: "
|
|
6
|
+
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishModules" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const CommonJsChunkFormatPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_options: void;
|
|
6
|
-
affectedHooks: "
|
|
6
|
+
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishModules" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -8,7 +8,7 @@ export declare const CopyRspackPlugin: {
|
|
|
8
8
|
new (copy: CopyRspackPluginOptions): {
|
|
9
9
|
name: BuiltinPluginName;
|
|
10
10
|
_options: RawCopyRspackPluginOptions;
|
|
11
|
-
affectedHooks: "
|
|
11
|
+
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishModules" | "finishMake" | "entryOption" | undefined;
|
|
12
12
|
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
13
13
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
14
14
|
};
|
|
@@ -3,7 +3,7 @@ export declare const DataUriPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_options: void;
|
|
6
|
-
affectedHooks: "
|
|
6
|
+
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishModules" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -4,7 +4,7 @@ export declare const DefinePlugin: {
|
|
|
4
4
|
new (define: DefinePluginOptions): {
|
|
5
5
|
name: BuiltinPluginName;
|
|
6
6
|
_options: Record<string, string>;
|
|
7
|
-
affectedHooks: "
|
|
7
|
+
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishModules" | "finishMake" | "entryOption" | undefined;
|
|
8
8
|
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
9
9
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
10
10
|
};
|
|
@@ -3,7 +3,7 @@ export declare const DeterministicChunkIdsPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_options: void;
|
|
6
|
-
affectedHooks: "
|
|
6
|
+
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishModules" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const DeterministicModuleIdsPlugin: {
|
|
|
3
3
|
new (): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_options: void;
|
|
6
|
-
affectedHooks: "
|
|
6
|
+
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishModules" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ export declare const ElectronTargetPlugin: {
|
|
|
3
3
|
new (context?: string | undefined): {
|
|
4
4
|
name: BuiltinPluginName;
|
|
5
5
|
_options: string;
|
|
6
|
-
affectedHooks: "
|
|
6
|
+
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishModules" | "finishMake" | "entryOption" | undefined;
|
|
7
7
|
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
8
8
|
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
9
|
};
|