Skip to content

Moving vite.config.ts on different location #245

Answered by ElMassimo
vizo asked this question in Q&A
Discussion options

You must be logged in to vote

Vite allows specifying a different config file, by passing --config:

bin/vite dev -- --config app/frontend/vite.config.ts
bin/vite build -- --config app/frontend/vite.config.ts

I would recommend keeping vite.config.ts at the root, since that's the default behavior for any Vite project.

By using a different configuration it's likely that you'll run into specific problems most users don't run into.


should respect config root directory from "/config/vite.json"

The root has higher priority than config/vite.json (which is resolved relative to the root), so that happens the other way around.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ElMassimo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants