getsentry / getsentry/sentry-javascript

[Next.js] Support setting different options for different runtimes (browser/server/edge)

Abierto
#13,837 6 comentarios 1 reacción 0 asignados Ver en GitHub
Improvement Next.js
Lenguaje dominante
TypeScript
Estrellas
8.7k
Forks
1.8k
Merge medio
1 d 17 h
PR fusionados (30 d)
523

Descripción

Originally posted by @ricardomatias [in discussions](https://github.com/getsentry/sentry-javascript/discussions/13833):

> I've removed the sentry.edge.config.ts and sentry.server.config.ts and I still get sourcemaps for both of them. I only want client sourcemaps.

I don't think this is possible right now without some very ugly hacks. We should provide some way of setting different options for the different runtimes.

Idea No.1 and probably my favorite: Allow for the `sentryBuildOptions` argument in `withSentryConfig` to be a function/callback that receives the runtime as an argument. (probably should pass it within an object so that we can extend it in the future)

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza por la integración de Next.js conSentryConfig y el manejo de sentryBuildOptions descritos en el issue. Rastrea cómo se identifican los runtimes de browser, server y edge, y determina cómo podría un callback recibir ese runtime. Se considera terminado cuando los llamadores pueden seleccionar distintas opciones de compilación para cada runtime, incluido el comportamiento de los sourcemaps.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
nextjs, typescript
Área
build-system, web-dev
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.