client/assets/ that go through Vite’s build pipeline, and static files in public/ that are copied to dist/ unchanged.
Processed assets (client/assets/)
Files under client/assets/ are resolved by Vite — they get bundled, minified, and output with hashed filenames. The default directory layout is:
| Alias | Resolves to |
|---|---|
@styles/* | client/assets/styles/* |
@scripts/* | client/assets/scripts/* |
@images/* | client/assets/images/* |
Static files (public/)
Files in public/ are copied to dist/ as-is without processing. Use this for:
- Favicons and app icons
robots.txtand similar fixed-name files- Large or binary assets that should not be hashed
public/favicon.ico becomes dist/favicon.ico.
Assets that need bundling, imports, or optimization belong under
client/assets/ rather than
public/. Vite cannot process files in public/.Images
Images underclient/assets/images/ go through Vite’s asset pipeline and receive hashed filenames for cache busting. Use the @images/ alias to reference them: