Skip to content

Conversation

@matthewmcgarvey
Copy link
Member

@matthewmcgarvey matthewmcgarvey commented Jan 24, 2026

Fixes #916
Fixes #913

These changes do two things:

Updates ignored to everything that is not src, public, or vite_config.js

This fixed lucky dev not showing changes when I updated src/css/app.cs.
The existing ignored where we excluded everything then added back the above is apparently not well supported in the vite tooling (at least that is what Claude tells me). Also, I did experience the 100% cpu usage on a previous attempt but this does not have that issue.

Removes publicDir

It seems that vite does not like having publicDir be a subdirectory of outDir. I believe this also fixed the problem for me where compiled js/css were ending up in both the public/assets/ and public/ directories but I haven't tested it very much.

I have never used Vite before and these changes were made by Claude so take all of this with a grain of salt

@jwoertink
Copy link
Member

Does this change the manifest file? Another thing I haven't checked yet is how images are handled... those still have to get into the manifest for the asset stuff.

@matthewmcgarvey
Copy link
Member Author

So here's the behavior I see:

yarn dev

  • Uses the public/manifest.dev.json to serve the real files in the src directory
  • Changes to css/js show up in the browser (seems obvious since it's serving the files directly)
  • If I restart it, css/js doesn't work until I also restart lucky

yarn build

  • Creates public/.vite/ directory with a manifest.json in there
  • Creates public/assets/ directory with the compiled js and css files (haven't tried with images)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compiled javascript ends up in public/ and public/assets/ directories Vite auto-reload (HMR?)

3 participants