sentry-javascript: [Next] My webpack config is ignored since 7.22
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Self-hosted/on-premise
Which package are you using?
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
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 15 (10 by maintainers)
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.
this works for me, thanks
withSentryConfigreturns a function with the same signature as yourmodule.exports. You need to consider that.Quickly rewriting your config for you: