Skip to content

Rails public/vite folder contains source files after bin/vite build #293

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

You must be logged in to vote

Hi Florens!

Haven't seen this before, so it's likely related to the app's configuration or dir structure.

If I had to guess based on the dir names, it looks like the sourceCodeDir is somehow ending up in Vite's output.

Vite will copy anything that is inside its public dir, which is one of the possible causes.

Vite Ruby will also process any additionalEntrypoints. You might want to check that you don't have an assets dir inside sourceCodeDir that contains code instead of images/stylesheets, or configure it to exclude that dir.

I'd recommend checking both your Vite Ruby and Vite config, and try using the default configuration (if you have customized it).

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@fvsch
Comment options

@ElMassimo
Comment options

@fvsch
Comment options

Answer selected by fvsch
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