OptionalcacheCache-Control header configuration (default: function returning immutable for hashed assets, must-revalidate for others).
urlPrefix (/assets/app-A9acsx54.js for
urlPrefix: '/assets') — a cache policy is about the URL the client
caches under, so the served path is the input, never the prefix-stripped
server path and never the absolute filesystem path. A directory request
delivers its resolved index path, and the path is never the .br/.gz
sidecar's, so a hashed asset keeps its policy whichever encoding is
negotiated. See CacheControlOptions for the full contract.OptionalcompressedEnable precompressed sidecar negotiation (default: true).
OptionaletagEnable ETag generation (default: true).
OptionalfallbackFallback file to serve for missing paths when Accept includes text/html (default: undefined). Used for SPA fallback.
OptionalfsThe filesystem to use for file operations.
OptionalindexIndex file to serve when a directory is requested (default: 'index.html'). Set to empty string '' to disable index resolution.
OptionalmaxMaximum file size to read fully into memory (default: 1MB). Files larger than this will use streaming when available.
OptionalrangesEnable Range request handling (default: true).
Required. The filesystem directory to serve files from.
OptionalurlURL prefix for static routes (default: '/').
Options for configuring the StaticPlugin.
Since
0.1.0