wxt-dev / wxt-dev/wxt

Auto-import configuration cannot override default dirs

Open
#2,391 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
10.5k
Forks
564
PR merge metrics
No merged PRs in 30d

Description

Feature Request

I'm using Auto-imports. It seems I can only extend the default dirs, but can't override them.

The docs say:

By default, WXT automatically sets up auto-imports for some of your project directories:

  • <srcDir>/components/*
  • <srcDir>/composables/*
  • <srcDir>/hooks/*
  • <srcDir>/utils/*

Not all developers like auto-imports. To disable them, set imports to false.

I'd like to able to:

  • disable the default dirs but keep auto-imports on
  • override dirs
  • extend dirs

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 the auto-import configuration guide linked in the issue, then trace how the imports and dirs options are processed. The change is done when auto-imports can remain enabled while default directories are disabled, replaced, or extended, with behavior covered by the relevant project tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
66/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.