Skip to content

Commit 8d1fecd

Browse files
fix(node): type runtime plugin beforeInit args
1 parent 7270391 commit 8d1fecd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/node/src/runtimePlugin.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ import type {
22
ModuleFederationRuntimePlugin,
33
ModuleFederation,
44
} from '@module-federation/runtime';
5+
6+
type BeforeInitArgs = Parameters<
7+
NonNullable<ModuleFederationRuntimePlugin['beforeInit']>
8+
>[0];
9+
510
type WebpackRequire = {
611
(id: string): any;
712
u: (chunkId: string) => string;
@@ -377,7 +382,7 @@ export const setupWebpackRequirePatching = (
377382
export default function (): ModuleFederationRuntimePlugin {
378383
return {
379384
name: 'node-federation-plugin',
380-
beforeInit(args) {
385+
beforeInit(args: BeforeInitArgs) {
381386
// Patch webpack chunk loading handlers
382387
(() => {
383388
// Create the chunk tracking object

0 commit comments

Comments
 (0)