Skip to content

Support .config/ dir #15911

@pi0

Description

@pi0

Description

Due to a lack of standards for where tools store their configuration, the number of top-level configuration files in projects is increasing day by day. See .config dir proposal for more context.

Suggested solution

I propose supporting .config/vite.js and .config/vite.config.js as alternative places to check and load vite configuration if top-level vite.config.ts does not exist to unblock adopting this new convention across the ecosystem.

Is it too early for Vite? While it can take a while to onboard more tools with this new convention, it will be an egg-and-chicken problem to adopt a new convention like this unless more mainstream tools onboard to support it.

Implementation

It seems we can easily append .config/ variants to DEFAULT_CONFIG_FILES array.

Alternatives

See relevant discussions.

Additional context

(sub-issue in vitest: vitest-dev/vitest#5204)

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions