-
Hey.. If i move vite.config.ts from Rails root to "app/frontend" (because it's not loaded), I get error: If i run by: I think commands bin/vite serve and build should respect config root directory from "/config/vite.json" Is there any other way to make it work out of the box? Thank you in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Vite allows specifying a different config file, by passing bin/vite dev -- --config app/frontend/vite.config.ts
bin/vite build -- --config app/frontend/vite.config.ts I would recommend keeping By using a different configuration it's likely that you'll run into specific problems most users don't run into.
The root has higher priority than |
Beta Was this translation helpful? Give feedback.
Vite allows specifying a different config file, by passing
--config
: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.
The root has higher priority than
config/vite.json
(which is resolved relative to the root), so that happens the other way around.