Open History to see the last commit
1// @effect-diagnostics nodeBuiltinImport:off - setup-script bootstrap, runs before any Effect runtime exists.
2/**
3 * The cache cannot be shared between worktrees: Vite's config hash includes
4 * the absolute project root, so each worktree must warm its own.
5 */
6import * as NodePath from "node:path";
7import * as NodeURL from "node:url";
8
9import { optimizeDeps, resolveConfig } from "vite";
10
11const webRoot = NodePath.dirname(NodePath.dirname(NodeURL.fileURLToPath(import.meta.url)));
12
13const config = await resolveConfig({ root: webRoot, logLevel: "error" }, "serve");
14await optimizeDeps(config);
15console.log("[warm-dep-cache] web dependency cache is warm");