nuxt / scripts

Plug-and-play script optimization for Nuxt applications. (Public Preview)
https://scripts.nuxt.com
MIT License
126 stars 8 forks source link

feat: expose runtime composables #58

Closed huang-julien closed 1 month ago

huang-julien commented 1 month ago

following #57 . Module authors that don't extends their tsconfig from the playground canno't import things like useScripts from #imports without having type issues, we should expose core composables from the package.

Should we improve this by exposing a single file for ./runtime/core instead ? or directly ./runtime

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
scripts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2024 3:32pm
scripts-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2024 3:32pm
harlan-zw commented 1 month ago

If the #imports alias is resolved then the #nuxt-scripts alias should be resolved. This would indicate a bigger issue somewhere that should be solved rather then requiring explicit imports.

For the playground types, if a module is a dependency of another module you should add it to the root .nuxtrc, see https://github.com/nuxt/scripts/blob/main/.nuxtrc#L2