Skip to content

ref(nitro): Inherit base Vitest config for vendored @sentry/conventions#21499

Closed
mydea wants to merge 1 commit into
developfrom
feat/use-sentry-conventions-nitro
Closed

ref(nitro): Inherit base Vitest config for vendored @sentry/conventions#21499
mydea wants to merge 1 commit into
developfrom
feat/use-sentry-conventions-nitro

Conversation

@mydea

@mydea mydea commented Jun 12, 2026

Copy link
Copy Markdown
Member

Summary

packages/nitro/vite.config.ts redefined test wholesale, so it did not inherit the base config's server.deps.inline rule. Since nitro's tests load the @sentry/node / @sentry/opentelemetry builds (which vendor @sentry/conventions as ESM .js), Vitest would externalize and require() that ESM copy — which fails on Node 18 (no require(esm) support).

This spreads ...baseConfig.test so nitro inherits the inline rule, alongside the same shared infra changes as the other @sentry/conventions PRs:

  • vite/vite.config.ts — inline @sentry/conventions in Vitest.
  • packages/typescript/tsconfig.json — map the @sentry/conventions/attributes subpath for node moduleResolution type builds.

Part of splitting the larger @sentry/conventions migration into per-package PRs.

Ref: #20982

🤖 Generated with Claude Code

…ns` loads on Node 18

`packages/nitro/vite.config.ts` overrode `test` wholesale, so it did not pick
up the base config's `server.deps.inline` rule. Spread `...baseConfig.test` so
nitro's tests transform the vendored `@sentry/conventions` ESM copy instead of
`require()`-ing it (which fails on Node 18).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mydea

mydea commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

Superseded by the foundational build-infra fix #21503, which relocates vendored deps out of node_modules at the rollup level. With that fix, the vendored @sentry/conventions no longer lands under a node_modules dir, so Vitest no longer externalizes/require()s it and nitro needs no test-config change. Closing as unnecessary.

@mydea mydea closed this Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant