assetsDir

tcmts.cli.web.assetsDir · #n22psvoc · term · runs on the server

uses node:path

Every build's browser assets, in one directory: each file is named by its content, so one an earlier build has is the same file, at the same URL (/_app/assets/<file>), and a browser that has it keeps it across deploys.

import type { Codebase } from "#codebase/tcmts/cli/codebase";
import { appsDir } from "#codebase/tcmts/cli/web";
import path from "node:path";

export const assetsDir = (cb: Codebase) => path.join(appsDir(cb), "assets")

uses

used by