-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(nuxt): Add import line for disabled autoImport
#13342
Conversation
size-limit report 📦
|
@@ -28,6 +28,7 @@ export default defineNuxtModule<ModuleOptions>({ | |||
filename: 'sentry-client-config.mjs', | |||
getContents: () => | |||
`import "${buildDirResolver.resolve(`/${clientConfigFile}`)}"\n` + | |||
'import { defineNuxtPlugin } from "#imports"\n' + |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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!
Adds explicit imports in case
autoImport
is disabled (Nuxt docs here). DisabledautoImport
in the E2E test to verify.fixes #13302