Function: xmCacheDir()
API / @xmachines/shared / vite-aliases / xmCacheDir
function xmCacheDir(importMetaUrl, name): string;Defined in: vite-aliases.ts:196
Returns the shared Vite cacheDir for this workspace package.
All browser test projects use a single cache under <workspace-root>/node_modules/.vite/
keyed by the project name. This means the dep optimizer runs once per project
across the whole workspace rather than once per local node_modules/.vite/ directory,
and a lockfile change only triggers one rebuild per project — not one per local cache.
Parameters
| Parameter | Type | Description |
|---|---|---|
importMetaUrl | string | Pass import.meta.url from the calling config file. |
name | string | Unique project name (matches test.name). |
Returns
string