Skip to content

@sentry/nextjs: doesn't produce typescript #3500

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

Closed
5 of 9 tasks
osdiab opened this issue May 5, 2021 · 2 comments · Fixed by #3847
Closed
5 of 9 tasks

@sentry/nextjs: doesn't produce typescript #3500

osdiab opened this issue May 5, 2021 · 2 comments · Fixed by #3847
Assignees
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK Type: Improvement

Comments

@osdiab
Copy link

osdiab commented May 5, 2021

Package + Version

  • @sentry/browser
  • @sentry/node
  • raven-js
  • raven-node (raven for node)
  • other: @sentry/nextjs

Version:

6.3.5

Description

My NextJS app uses typescript, the wizard was not smart enough to figure that out and produce TypeScript compatible files for sentry.client.config.js or sentry.server.config.js

@osdiab
Copy link
Author

osdiab commented May 5, 2021

Oh, I see now that it explicitly can't be TS, and it explicitly also can't be in my src directory like all the rest of my code - the @sentry/nextjs library requires that these files be at the root level, and have specific names. The fact these files get magically included without any explicit export and that they need to behave differently than all the other code in my codebase rubs me wrong.

@iker-barriocanal
Copy link
Contributor

Those files don't require any specific exports because they are injected into the code; so no, they can't be TS. Let me know if you have further questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK Type: Improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants