vuetifyjs / vuetifyjs/nuxt-module
[Question | Feature request] Disable Auto-import components feature ( Fully tree shakable ? )
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 286
- Forks
- 35
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 4
Description
As the title suggests, I'm facing an issue where I have a separate repository for common components, which I build using Vite and link to the package.json in the main project that runs Nuxt.
When I run the Nuxt project in development mode, everything works fine. However, when building for production, I need to follow these steps:
- Build the common components repository.
- Build the main project, which uses the built files from the common repository.
The problem arises after the first step. Since the common components repository doesn't use Nuxt, the build output doesn't include the necessary Vuetify components.
I know I can manually add an import line inside the common components to import the required Vuetify components. However, during development, this can be confusing for other team members (who have limited knowledge of Nuxt and auto-import functionality), as TypeScript and Nuxt recognize the Vuetify components without explicit imports and show no errors. But after building, it just doesn’t work.
TL;DR: Is there a way to disable the auto-import components feature?
What I tried:
nuxt.config.ts
vuetify: {
moduleOptions: {
},
vuetifyOptions: {
components: false,
},
},
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with nuxt.config.ts and the moduleOptions/vuetifyOptions.components setting shown in the issue. Reproduce the two-step Vite and Nuxt production build using the linked common-components repository, then determine the supported configuration for disabling component auto-import. Done means the common components build includes the required Vuetify components without relying on Nuxt auto-imports.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxt, typescript, vite
- Domain
- build-system, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100