Skip to content

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

Closed

Description

@osdiab

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

Activity

  1. osdiab commented on May 5, 2021

    @osdiab
    Author

    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.

  2. iker-barriocanal commented on May 5, 2021

    @iker-barriocanal
    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

Metadata

Metadata

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions