feat!: use Nuxt components loader instead custom Vite plugin#276
Open
feat!: use Nuxt components loader instead custom Vite plugin#276
Conversation
commit: |
userquin
commented
Sep 11, 2024
|
|
||
| nuxt.hook('prepare:types', ({ references }) => { | ||
| references.push({ types: 'vuetify' }) | ||
| // references.push({ types: 'vuetify' }) |
Member
Author
There was a problem hiding this comment.
Testing with and without this, VSCode doesn't seem to work on LazyVbtn (missing auto completion/props suggestion), IntelliJ works 🤔
userquin
commented
Sep 11, 2024
| kebabName: toKebabCase(component), | ||
| export: component, | ||
| filePath, | ||
| shortPath: filePath, |
Member
Author
userquin
commented
Sep 11, 2024
| .entries(components) | ||
| .forEach(([component, entry]) => { | ||
| const from = entry.from | ||
| const name = from.split('/').at(-1) |
Member
Author
There was a problem hiding this comment.
this can be removed, the name is the component var
userquin
commented
Sep 11, 2024
| import type { Options } from '@vuetify/loader-shared' | ||
| import { isPackageExists } from 'local-pkg' | ||
| import type * as Components from 'vuetify/components' | ||
| import type * as Directives from 'vuetify/directives' |
# Conflicts: # package.json
Member
Author
|
This pr will be superseded with another one using unimport presets exported by vuetify: the pr in vuetify dev branch and should be released in vuetify 3.8 soon. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

DON'T MERGE YET
Description
This PR will use Nuxt auto import instead custom Vuetify Vite plugin to resolve components, this will allow:
resolveComponentwith Vuetify componentsLazyV**Vuetify variants (defineAsyncComponent):LazyVBtnfor example<LazyVisibleVBtn />,<LazyIdleVBtn />,<LazyEventVBtn />,<LazyMediaVBtn />...): feat(nuxt): delayed/lazy hydration support 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-coreinsteadvue: addeddeclarations.d.tsin playground root.Tip
The author of this PR can publish a preview release by commenting
/publishbelow.