@sentry/cloudflare/vite: Add a default export for the Vite plugin
Los mantenedores suelen responder en 1 día
@JPeer264 ya está trabajando en esto.
Desde el 20/9/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Description
Add a default export to the @sentry/cloudflare/vite subpath, as an alias of sentryCloudflareVitePlugin, so the plugin can be imported under any name:
// vite.config.ts
import { cloudflare } from '@cloudflare/vite-plugin';
import sentry from '@sentry/cloudflare/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [cloudflare(), sentry()],
});
sentryCloudflareVitePlugin stays the documented name, so this is additive and breaks nothing.
// packages/cloudflare/src/vite/index.ts
export default sentryCloudflareVitePlugin;
Why
- Most Vite plugins default-export, for example
@vitejs/plugin-react,vinextandnitro/vite. A default export matches what users expect at that place in the config. - The call site reads better with a short local name:
plugins: [cloudflare(), sentry()]. - There is precedent in this repo:
@sentry/astrodefault-exports its integration, and@sentry/nuxtits module.
Notes
- The
./vitesubpath currently also declares arequirecondition. In CJS, a default export is reached asrequire('@sentry/cloudflare/vite').default. The comment at the top ofsrc/vite/index.tssays the CJS entry cannot resolve anyway (@sentry/server-utils/orchestrion/vitehas norequirecondition), and Vite configs are ESM in practice, so this is acceptable. - Sentry's other Vite plugins (
@sentry/vite-plugin, SvelteKit, SolidStart) use named exports only, so this makes the Cloudflare one the exception. The named export stays, and docs keep using it. - The subpath exports more than the plugin (the options type today), so the JSDoc on the default export should state that it is an alias of
sentryCloudflareVitePlugin.
Scope
export default sentryCloudflareVitePlugin;inpackages/cloudflare/src/vite/index.ts, with JSDoc.- A test asserting the default export is the same function as the named one.
- Optionally a docs snippet showing the short import.
- Lenguaje dominante
- TypeScript
- Estrellas
- 8.7k
- Forks
- 1.9k
- Merge medio
- 1 d 15 h
- PR fusionados (30 d)
- 523
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de getsentry/sentry-javascript
-
Next.js: basePath is concatenated onto absolute router.push hrefs, corrupting navigation transaction namesPosiblemente ocupada @Lms24 la tomó hace 3 días. AbiertoBrowser Bug Next.js Traces
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
getsentry/sentry-javascript#24672 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
javascript
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
getsentry/sentry-javascript#24200 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
javascript Task
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
getsentry/sentry-javascript#24134 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Cloudflare Workers javascript Tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
getsentry/sentry-javascript#24051 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Bug Bun javascript
Dificultad 2/5 1-3 horas Aptitud para principiantes 92/100
getsentry/sentry-javascript#24045 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de getsentry/sentry-javascript
Issues similares
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
StabilityNexus/Fate-EVM-Frontend#153 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
code-yeongyu/oh-my-openagent#9039 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Tencent/teamai-cli#862 ·
Los mantenedores suelen responder en 1 día
-
bug good first issue hacktoberfest redis
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
libredb/libredb-studio#1164 ·
Los mantenedores suelen responder en 1 día
-
flake
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
coder/xum#4920 · 2 comentarios ·
Los mantenedores suelen responder en 1 día