-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
- Review the documentation: https://docs.sentry.io/
- Search for existing issues: https://github.com/getsentry/sentry-javascript/issues
- Use the latest release: https://github.com/getsentry/sentry-javascript/releases
- Provide a link to the affected event from your Sentry account
Package + Version
-
@sentry/browser -
@sentry/node -
raven-js -
raven-node(raven for node) - other:
@sentry/nextjs
Version:
6.4.1
Description
During the process of upgrading one of our next.js applications from webpack 4 to webpack 5 I stumbled upon a bug where using withSentryConfig causes webpack 5 to duplicate dependencies in the final output. Using the webpack bundle analyzer I can see that packages normally bundled in _app also get their own shared bundle
Without withSentryConfig:
Using withSentryConfig: (Notice that @apollo/client is now included in both _app and the 675- bundle)
I've created a simple app using the with-apollo template that reproduces the issue: https://github.com/pgrippi/sentry-nextjs-code-duplication-bug.
You can modify next.config.js, swapping the module.exports statements and running yarn build to see the bundle output difference
To clarify the issue not limited to @apollo/client, it looks like most modules imported from npm that appear in both _app and other pages get duplicated, the apollo client is just very noticeable given its large footprint

