Skip to content

Commit 3ea40d4

Browse files
committed
fix webpackConfig.plugins type
1 parent cdcc4fd commit 3ea40d4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/nextjs/src/config/types.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { SentryCliPluginOptions } from '@sentry/webpack-plugin';
2+
import { WebpackPluginInstance } from 'webpack';
23

34
export type SentryWebpackPluginOptions = SentryCliPluginOptions;
4-
export type SentryWebpackPlugin = { options: SentryWebpackPluginOptions };
5+
export type SentryWebpackPlugin = WebpackPluginInstance & { options: SentryWebpackPluginOptions };
56

67
/**
78
* Overall Nextjs config
@@ -39,7 +40,7 @@ export type WebpackConfigFunction = (config: WebpackConfigObject, options: Build
3940

4041
export type WebpackConfigObject = {
4142
devtool?: string;
42-
plugins?: Array<{ [key: string]: unknown }>;
43+
plugins?: Array<WebpackPluginInstance | SentryWebpackPlugin>;
4344
entry: WebpackEntryProperty;
4445
output: { filename: string; path: string };
4546
target: string;

0 commit comments

Comments
 (0)