Skip to content

Conversation

@meeq
Copy link
Contributor

@meeq meeq commented May 24, 2021

Passing type import('next/dist/next-server/server/config').NextConfig into withSentryConfig results in a type-checking error (ts(2345)):

Argument of type 'NextConfig' is not assignable to parameter of type 'NextConfigExports'.
  Types of property 'experimental' are incompatible.
    Type '{ cpus?: number; plugins?: boolean; profiling?: boolean; sprFlushToDisk?: boolean; reactMode?: "legacy" | "concurrent" | "blocking"; workerThreads?: boolean; pageEnv?: boolean; optimizeImages?: boolean; ... 13 more ...; gzipSize?: boolean; }' is not assignable to type '{ plugins: boolean; }'.
      Property 'plugins' is optional in type '{ cpus?: number; plugins?: boolean; profiling?: boolean; sprFlushToDisk?: boolean; reactMode?: "legacy" | "concurrent" | "blocking"; workerThreads?: boolean; pageEnv?: boolean; optimizeImages?: boolean; ... 13 more ...; gzipSize?: boolean; }' but required in type '{ plugins: boolean; }'.

Passing type `import('next/dist/next-server/server/config').NextConfig` into `withSentryConfig` results in a type-checking error (`ts(2345)`):

```
Argument of type 'NextConfig' is not assignable to parameter of type 'NextConfigExports'.
  Types of property 'experimental' are incompatible.
    Type '{ cpus?: number; plugins?: boolean; profiling?: boolean; sprFlushToDisk?: boolean; reactMode?: "legacy" | "concurrent" | "blocking"; workerThreads?: boolean; pageEnv?: boolean; optimizeImages?: boolean; ... 13 more ...; gzipSize?: boolean; }' is not assignable to type '{ plugins: boolean; }'.
      Property 'plugins' is optional in type '{ cpus?: number; plugins?: boolean; profiling?: boolean; sprFlushToDisk?: boolean; reactMode?: "legacy" | "concurrent" | "blocking"; workerThreads?: boolean; pageEnv?: boolean; optimizeImages?: boolean; ... 13 more ...; gzipSize?: boolean; }' but required in type '{ plugins: boolean; }'.
```
@meeq meeq requested a review from kamilogorek as a code owner May 24, 2021 22:07
import { logger } from '@sentry/utils';
import defaultWebpackPlugin, { SentryCliPluginOptions } from '@sentry/webpack-plugin';
import * as SentryWebpackPlugin from '@sentry/webpack-plugin';
import { NextConfig } from 'next/dist/next-server/server/config';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kamilogorek kamilogorek enabled auto-merge (squash) June 10, 2021 09:41
@kamilogorek kamilogorek disabled auto-merge June 10, 2021 09:41
@kamilogorek kamilogorek enabled auto-merge (squash) June 10, 2021 09:41
@kamilogorek
Copy link
Contributor

Resolved conflicts and merged manually via 888c14a
Thanks!

auto-merge was automatically disabled June 10, 2021 09:57

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants