vuetifyjs / vuetifyjs/nuxt-module

[Question | Feature request] Disable Auto-import components feature ( Fully tree shakable ? )

Open
#284 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: build enhancement priority: p4: low
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:

  1. Build the common components repository.
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.