Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/config/shared-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ See [The `public` Directory](/guide/assets#the-public-directory) for more detail
- **Type:** `string`
- **Default:** `"node_modules/.vite"`

Directory to save cache files. Files in this directory are pre-bundled deps or some other cache files generated by vite, which can improve the performance. You can use `--force` flag or manually delete the directory to regenerate the cache files. The value can be either an absolute file system path or a path relative to project root. Default to `.vite` when no `package.json` is detected.
Directory to save cache files. Files in this directory are pre-bundled deps and some other cache files generated by Vite, mostly to improve dev server performance. This directory isn't used as a persistent cache for production builds, so running `vite build` repeatedly will still rebuild the app from source. You can use `--force` flag or manually delete the directory to regenerate the cache files. The value can be either an absolute file system path or a path relative to project root. Default to `.vite` when no `package.json` is detected.

## resolve.alias

Expand Down
2 changes: 2 additions & 0 deletions docs/guide/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

When it is time to deploy your app for production, simply run the `vite build` command. By default, it uses `<root>/index.html` as the build entry point, and produces an application bundle that is suitable to be served over a static hosting service. Check out the [Deploying a Static Site](./static-deploy) for guides about popular services.

Vite's dependency pre-bundling and `cacheDir` file-system cache are dev-focused optimizations. Production builds don't currently reuse `cacheDir` as a persistent cache across separate `vite build` runs, so repeated builds are expected to transform and bundle the app again.

<ScrimbaLink href="https://scrimba.com/intro-to-vite-c03p6pbbdq/~037q?via=vite" title="Building for Production">Watch an interactive lesson on Scrimba</ScrimbaLink>

## Browser Compatibility
Expand Down