Skip to content

Commit a8f9efa

Browse files
committed
fix: type definition for webpack_require should include g
1 parent c697021 commit a8f9efa

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/node/src/runtimePlugin.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type {
55
type WebpackRequire = {
66
(id: string): any;
77
u: (chunkId: string) => string;
8+
g: any;
89
p: string;
910
m: { [key: string]: any };
1011
o: (obj: any, prop: string) => boolean;

webpack/module.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,10 @@ declare var __webpack_base_uri__: string;
190190
declare var __webpack_runtime_id__: string;
191191
declare const __webpack_hash__: string;
192192
declare const __webpack_modules__: Record<string | number, NodeJS.Module>;
193-
declare const __webpack_require__: (id: string | number) => unknown;
193+
declare const __webpack_require__: {
194+
(id: string | number): unknown;
195+
g: any;
196+
};
194197
declare var __webpack_chunk_load__: (chunkId: string | number) => Promise<void>;
195198
declare var __webpack_get_script_filename__: (
196199
chunkId: string | number,

0 commit comments

Comments
 (0)