-
-
Notifications
You must be signed in to change notification settings - Fork 305
feat(nuxt): use nuxt
to resolve its own paths
#1265
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: OrbisK <robin.kehl@singular-it.de>
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.
this is a valid nuxt entry, believe it or not, and if present nuxt would actually use this
// TODO: we need to register these as source files which may not be all used | ||
for (const path of availableSources) { | ||
inputs.push(toProductionEntry(path, { allowIncludeExports: true })); | ||
} |
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.
is there a way to register these paths so any imports into them are respected, but unused exports are detected?
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.
Yes, if I understand correctly, this is the breakdown:
- default behavior: exports of entry files are not reported
skipExportsAnalysis: false
- report unused exports (what you're asking for)allowIncludeExports: true
- report unused exports only with flag--include-entry-exports
/includeEntryExports
Would be awesome to see this finished :) |
resolves #1255
this rewrites the nuxt plugin to use nuxt itself to resolve its own paths, supporting layers, modules, etc.
🚧 todo
at the moment test is failing.
we need to enable components + imports to register dependencies without being entries - ie. detect unused composables, but if a composable imports from something else, then that should count as that other thing being used
(this may be straightforward)