Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ test.describe('Rendering Modes with Cached HTML', () => {
await testChangingTracingMetaTagsOnISRPage(page, '/rendering-modes/isr-1h-cached-page', 'ISR 1h Cached Page');
});

// TODO: Make test work with Nuxt 5
test.skip('exclude tracing meta tags on SWR-cached page', async ({ page }) => {
test('exclude tracing meta tags on SWR-cached page', async ({ page }) => {
await testExcludeTracingMetaTagsOnCachedPage(page, '/rendering-modes/swr-cached-page', 'SWR Cached Page');
});

// TODO: Make test work with Nuxt 5
test.skip('exclude tracing meta tags on SWR 1h cached page', async ({ page }) => {
test('exclude tracing meta tags on SWR 1h cached page', async ({ page }) => {
await testExcludeTracingMetaTagsOnCachedPage(page, '/rendering-modes/swr-1h-cached-page', 'SWR 1h Cached Page');
});

Expand Down
4 changes: 3 additions & 1 deletion packages/nuxt/src/runtime/plugins/sentry.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export default (nitroApp => {
!!(event as any).res?.headers?.has?.('x-nitro-prerender');

// oxlint-disable-next-line typescript-oxlint/no-unsafe-member-access
const isSWRCachedPage = event?.context?.cache?.options?.swr as boolean | undefined;
const isSWRCachedPage = /* Nitro v2 */ (event?.context?.cache?.options?.swr ||
// oxlint-disable-next-line typescript-oxlint/no-unsafe-member-access
/* Nitro v3 */ event?.context?.routeRules?.swr) as boolean;

if (!isPreRenderedPage && !isSWRCachedPage) {
addSentryTracingMetaTags(html.head);
Expand Down
Loading