-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat!: use Nuxt components loader instead custom Vite plugin #276
base: main
Are you sure you want to change the base?
Conversation
commit: |
@@ -54,29 +54,42 @@ export function configureNuxt( | |||
}) | |||
|
|||
nuxt.hook('prepare:types', ({ references }) => { | |||
references.push({ types: 'vuetify' }) | |||
// references.push({ types: 'vuetify' }) |
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.
Testing with and without this, VSCode doesn't seem to work on LazyVbtn
(missing auto completion/props suggestion), IntelliJ works 🤔
kebabName: toKebabCase(component), | ||
export: component, | ||
filePath, | ||
shortPath: filePath, |
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.
.entries(components) | ||
.forEach(([component, entry]) => { | ||
const from = entry.from | ||
const name = from.split('/').at(-1) |
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 can be removed, the name is the component var
import { isPackageExists } from 'local-pkg' | ||
import type * as Components from 'vuetify/components' | ||
import type * as Directives from 'vuetify/directives' |
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.
review these 2 imports
# Conflicts: # package.json
DON'T MERGE YET
Description
This PR will use Nuxt auto import instead custom Vuetify Vite plugin to resolve components, this will allow:
resolveComponent
with Vuetify componentsLazyV**
Vuetify variants (defineAsyncComponent
):LazyVBtn
for example<LazyVisibleVBtn />
,<LazyIdleVBtn />
,<LazyEventVBtn />
,<LazyMediaVBtn />
...): feat: delayed hydration nuxt/nuxt#26468This PR also includes:
Linked Issues
Additional Context
There is some Nuxt module or dependency (Vuetify or I18n Nuxt module) still augmenting
@vue/runtime-core
insteadvue
: addeddeclarations.d.ts
in playground root.Tip
The author of this PR can publish a preview release by commenting
/publish
below.