-
Notifications
You must be signed in to change notification settings - Fork 73
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
🆒 Your use case
If Nuxt project has autoImports turned off, when you want to import some composable from nuxt/scripts you need to do something like this:
import { useScriptGoogleTagManager } from '@nuxt/scripts/dist/runtime/registry/google-tag-manager'Which also does not work and it leads to this error:
🆕 The solution you'd like
Add Nuxt aliases or something similar so the developer can easily import composable or components explicitly.
Example:
// re-export everything through the root index barrel file
import { useScriptGoogleTagManager } from '@nuxt/scripts
// re-export just for certain folder index barrel file
import { useScriptGoogleTagManager } from '@nuxt/scripts/registry
// or avoid using barrel files due to performance issues and use at least Nuxt alias and directly import file
import useScriptGoogleTagManager from '@nuxt/scripts/registry/google-tag-manager.ts🔍 Alternatives you've considered
No response
ℹ️ Additional info
No response
rpauls-scayle
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
