question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Next] My webpack config is ignored since 7.22

See original GitHub issue

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which package are you using?

@sentry/nextjs

SDK Version

7.22.0

Framework Version

No response

Link to Sentry event

No response

Steps to Reproduce

I believe it has something to do with

https://github.com/getsentry/sentry-javascript/pull/6291

Have a custom webpack config:

/**
 * @type {import('next').NextConfig}
 */
const nextConfig = {
  ...
  sentry: {
    disableClientWebpackPlugin: true,
    disableServerWebpackPlugin: true,
  },
  webpack(config, { dev }) {

    console.log('hi');

    return config;
  },
};

Expected Result

Echoes “hi” since it’s picked up by Next

Actual Result

My webpack config is ignored

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Reactions:1
  • Comments:15 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
lforstcommented, Dec 13, 2022

Follow-up question: the withSentryConfig.d.ts declaration file still declares the return type of withSentryConfig to be NextConfigFunction | NextConfigObject, but the implementation now unconditionally returns a function. Was this just an oversight, or was the return type deliberately left broader to leave the option open to maybe return an object again in a later version?

Your assumption is correct. I deliberately left this return type broad so that we can go back to returning an object in future versions without requiring a major bump if we deem it necessary.

1reaction
simPodcommented, Dec 2, 2022

Quickly rewriting your config for you:

this works for me, thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack ignores webpack.config.js - Stack Overflow
It's odd that using a webpack.config.js file in your project root isn't working. Check this webpack-demo project. I think it can help you...
Read more >
jest encountered an unexpected token uuid - You.com | The AI ...
I tried copying some of the jest config from the create-react-app as its working there. I put it in jest.config.js instead of package.json....
Read more >
Setting ESLint on a React Typescript project (2022)
PS: You can ignore if the version doesn't match with the example shown above. Step 4: Setup ESLint. Inside the project directory, open...
Read more >
reactjs - Config rules being ignored, which config file(s) are being ...
I'd like to ignore these errors and remove them from the output for the time ... from [34mℹ[39m [90m「wds」[39m: Content not from webpack...
Read more >
Conda installation requested and failed in local galaxy - admin
HI, When I try to run galaxy local, I get the message “conda installation ... Ignoring configparser: markers 'python_version < “3.2”' don't match...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found