sentry-wizard
sentry-wizard copied to clipboard
[nextjs] Detect and generate TS files if on a TypeScript environment
If we can see that user's are using TS, generate and use _error.ts, next.config.ts, sentry.server.config.ts, and sentry.client.config.ts. The easiest way to do this is to check for the existence of a tsconfig.
@AbhiPrasad - FYI, I removed (from your description) checking for an existing next.config.ts as a way to tell if the project is TS, because even in TS projects, next.config.js is often still in JS, since it doesn't go through the full build pipeline. Every TS project needs a tsconfig, though, so that is for sure a reliable check.