Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/nitro/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import baseConfig from '../../vite/vite.config';
export default {
...baseConfig,
test: {
...baseConfig.test,
typecheck: {
enabled: true,
tsconfig: './tsconfig.test.json',
Expand Down
5 changes: 4 additions & 1 deletion packages/typescript/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"strict": true,
"strictBindCallApply": false,
"target": "es2020",
"noUncheckedIndexedAccess": true
"noUncheckedIndexedAccess": true,
"paths": {
"@sentry/conventions/attributes": ["../../node_modules/@sentry/conventions/dist/attributes"]
}
}
}
10 changes: 10 additions & 0 deletions vite/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ export default defineConfig({
__DEBUG_BUILD__: true,
},
test: {
server: {
deps: {
// `@sentry/conventions` is vendored into our build output (under `build/esm/node_modules/...`)
// as ESM `.js` files. Vitest externalizes anything under a `node_modules/` path and loads it via
// native `require`, which fails on Node 18 ("ES Module shipped in a CommonJS package") because
// Node <20.19 can't `require()` ESM. Inlining makes Vitest transform it instead, so it works on
// all supported Node versions. Production is unaffected (the package resolves via its exports map).
inline: [/@sentry[/\\]conventions/],
},
},
coverage: {
enabled: true,
reportsDirectory: './coverage',
Expand Down
Loading