Skip to content

pantoken-root / plugins/vite/workspace-orchestrator/src / FileServerEntry

Interface: FileServerEntry ​

Experimental

One static file-serving middleware entry.

Properties ​

mountPath ​

mountPath: string

Experimental

URL path prefix to mount the middleware at, e.g. "/styles/apps".


serveDir ​

serveDir: string

Experimental

Local directory to serve files from.


extension ​

extension: string

Experimental

Only serve files whose URL path ends with this extension, e.g. ".css".


contentType ​

contentType: string

Experimental

Value for the Content-Type response header.


pathTransform? ​

optional pathTransform?: (urlRelativePath) => string

Experimental

Optional transform applied to the URL-relative path before resolving against serveDir, e.g. (p) => p.replace(//([^/]+)\.css$/, "/$1/app.css").

Parameters ​

urlRelativePath ​

string

Returns ​

string