Skip to content

Commit 9015847

Browse files
committed
add WebpackConfigObjectWithModuleRules type
1 parent 22fab0f commit 9015847

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/nextjs/src/config/types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ export type WebpackConfigObject = {
100100
[key: string]: unknown;
101101
};
102102

103+
// A convenience type to save us from having to assert the existence of `module.rules` over and over
104+
export type WebpackConfigObjectWithModuleRules = WebpackConfigObject & Required<Pick<WebpackConfigObject, 'module'>>;
105+
103106
// Information about the current build environment
104107
export type BuildContext = {
105108
dev: boolean;

0 commit comments

Comments
 (0)