Skip to content

fix: withSentryConfig and withPlugins ([email protected]) don't render images in dev mode #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

natterstefan
Copy link
Owner

@natterstefan natterstefan commented Jun 30, 2021

Issue - withSentryConfig with withPlugins

When downgrading next to [email protected] images are not rendered properly during development (next/image), compared to running the app with [email protected].

The following version of next-compose-plugins is used "next-compose-plugins": "2.2.1"

The issue also appears with these combinations

"@sentry/nextjs": "6.8.0", // also with 6.7.1
"next": "10.1.3",

with this next.config.js

// see https://github.com/natterstefan/next-with-sentry/blob/6ab34648623c80ff5e4c65ee72ff6e4c7b60e1c1/next.config.js#L36-L37
const config = withPlugins([withGraphql], moduleExports) 
module.exports = withSentryConfig(config, SentryWebpackPluginOptions) 

and is resolved with

"@sentry/nextjs": "6.8.0", // also with 6.7.1
"next": "10.2.3" // but not with 10.1.3

with this next.config.js

// next.config.js
module.exports = withPlugins(
  [withGraphql],
  withSentryConfig(moduleExports, SentryWebpackPluginOptions)
)

FTR: this config does not work with [email protected]!

Related issues

Screenshots

[email protected] on localhost (this branch)

It does not work when running yarn dev but does with yarn build && yarn start!

image

[email protected] on Vercel (this branch)

https://next-with-sentry-git-fix-202106-image-issue-2b3df5-natterstefan.vercel.app/

image

[email protected] on localhost (main branch)

image

@natterstefan natterstefan added bug Something isn't working work in progress labels Jun 30, 2021
@natterstefan natterstefan self-assigned this Jun 30, 2021
@vercel
Copy link

vercel bot commented Jun 30, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/natterstefan/next-with-sentry/3zN2GPLuV4FcNnoej9PSjwDyvkCL
✅ Preview: https://next-with-sentry-git-fix-202106-image-issue-2b3df5-natterstefan.vercel.app

@natterstefan natterstefan changed the title chore: [email protected] does not render images in dev mode chore: withSentryConfig with withPlugins ([email protected]) does not render images in dev mode Jun 30, 2021
@natterstefan natterstefan changed the title chore: withSentryConfig with withPlugins ([email protected]) does not render images in dev mode chore: withSentryConfig and withPlugins ([email protected]) does not render images in dev mode Jun 30, 2021
@natterstefan natterstefan changed the title chore: withSentryConfig and withPlugins ([email protected]) does not render images in dev mode chore: withSentryConfig and withPlugins ([email protected]) don't render images in dev mode Jun 30, 2021
@natterstefan
Copy link
Owner Author

natterstefan commented Sep 26, 2021

FTR (based on 0b95676):

    "@sentry/nextjs": "6.13.2",
    "next": "10.2.3",

works (also with "next": "11.1.2"), but still

    "@sentry/nextjs": "6.13.2",
    "next": "10.1.3",

does not.

@natterstefan natterstefan changed the title chore: withSentryConfig and withPlugins ([email protected]) don't render images in dev mode fix: withSentryConfig and withPlugins ([email protected]) don't render images in dev mode Sep 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant