Skip to content

Conversation

s1gr1d
Copy link
Member

@s1gr1d s1gr1d commented Aug 13, 2024

Adds explicit imports in case autoImport is disabled (Nuxt docs here). Disabled autoImport in the E2E test to verify.

fixes #13302

@s1gr1d s1gr1d requested review from a team, Lms24 and stephanie-anderson and removed request for a team August 13, 2024 09:21
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser 22.5 KB (added)
@sentry/browser (incl. Tracing) 34.3 KB (added)
@sentry/browser (incl. Tracing, Replay) 70.52 KB (added)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 63.83 KB (added)
@sentry/browser (incl. Tracing, Replay with Canvas) 74.91 KB (added)
@sentry/browser (incl. Tracing, Replay, Feedback) 87.54 KB (added)
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 89.36 KB (added)
@sentry/browser (incl. metrics) 26.81 KB (added)
@sentry/browser (incl. Feedback) 39.47 KB (added)
@sentry/browser (incl. sendFeedback) 27.13 KB (added)
@sentry/browser (incl. FeedbackAsync) 31.79 KB (added)
@sentry/react 25.26 KB (added)
@sentry/react (incl. Tracing) 37.29 KB (added)
@sentry/vue 26.65 KB (added)
@sentry/vue (incl. Tracing) 36.14 KB (added)
@sentry/svelte 22.64 KB (added)
CDN Bundle 23.73 KB (added)
CDN Bundle (incl. Tracing) 35.97 KB (added)
CDN Bundle (incl. Tracing, Replay) 70.36 KB (added)
CDN Bundle (incl. Tracing, Replay, Feedback) 75.6 KB (added)
CDN Bundle - uncompressed 69.61 KB (added)
CDN Bundle (incl. Tracing) - uncompressed 106.54 KB (added)
CDN Bundle (incl. Tracing, Replay) - uncompressed 218.05 KB (added)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 230.94 KB (added)
@sentry/nextjs (client) 37.16 KB (added)
@sentry/sveltekit (client) 34.9 KB (added)
@sentry/node 115.61 KB (added)
@sentry/node - without tracing 90 KB (added)
@sentry/aws-serverless 99.42 KB (added)

filename: 'sentry-client-config.mjs',
getContents: () =>
`import "${buildDirResolver.resolve(`/${clientConfigFile}`)}"\n` +
'import { defineNuxtPlugin } from "#imports"\n' +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to check: This does not cause problems if auto import is enabled, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this doesn't cause problems. Auto-import just auto-imports if it is not there. If there is an import, it's fine as well. It's always okay to explicitly import. (docs here)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense, thx for explaining!

@s1gr1d s1gr1d merged commit e623782 into develop Aug 13, 2024
@s1gr1d s1gr1d deleted the sig/nuxt-no-auto-imports branch August 13, 2024 11:13
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.

[Nuxt] Error with autoImport disabled

2 participants