@publier/shell
#### @publier/shell
Overview
@publier/shell
Modules
publier.shell.buildpublier.shell.integrationpublier.shell.loaderspublier.shell.schemaspublier.shell.search
Functions
publierCacheControl
function publierCacheControl(path: string): string
Runtime helper for customers self-hosting with a Node/Bun/Deno server:
import { publierCacheControl } from ‘@publier/shell’; response.headers.set(‘Cache-Control’, publierCacheControl(url.pathname));
Returns the same policy the _headers file encodes, so CDN-hosted and
self-hosted Publier sites behave identically.
Parameters
| Name | Type |
|---|---|
path | string |
Variables
HASHED_ASSET_RE
const HASHED_ASSET_RE = ...
Hashed-asset path prefixes. Files under these dirs are content-addressed
(filename changes on rebuild), so they are safe to mark immutable for a
year. Keep in sync with the Rust HASHED_PREFIXES constant in
native/src/build_hooks/headers.rs.