Skip to content

Conversation

@lforst
Copy link
Contributor

@lforst lforst commented Aug 31, 2023

Seems like Next.js doesn't like it if we export defaults in route handlers: https://github.com/getsentry/sentry-javascript/actions/runs/6031414061/job/16365451995

It appears this is only an error message in dev mode as of now, but we should fix it nonetheless in case it becomes an actual error at some point.

Fixes #8934

@github-actions
Copy link
Contributor

github-actions bot commented Aug 31, 2023

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 75.32 KB (0%)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 31.21 KB (0%)
@sentry/browser - Webpack (gzipped) 21.83 KB (0%)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 69.84 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 28.16 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped) 20.15 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 220.72 KB (0%)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 85 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 59.71 KB (0%)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 31.06 KB (+0.01% 🔺)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 75.34 KB (0%)
@sentry/react - Webpack (gzipped) 21.86 KB (0%)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 93.2 KB (0%)
@sentry/nextjs Client - Webpack (gzipped) 50.78 KB (0%)

}

// Re-export anything exported by the page module we're wrapping. When processing this code, Rollup is smart enough to
// not include anything whose name matchs something we've explicitly exported above.

Choose a reason for hiding this comment

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

Just a bystander reading this but maybe you can remove the " above" bit at the end since the comment has moved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yea. Thanks <3

@lforst lforst enabled auto-merge (squash) September 5, 2023 08:16
@lforst lforst merged commit b57e139 into develop Sep 5, 2023
@lforst lforst deleted the lforst-fix-nextjs-default-export branch September 5, 2023 08:33
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.

error Detected default export in '...'. Export a named export for each HTTP method instead.

4 participants