Skip to content

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

Rhyngwyneb: FileServerEntry

Arbrofol

Un mewnbwn middleware sy'n gwasanaethu ffeiliau statig.

Eiddo

mountPath

mountPath: string

Arbrofol

Rhagddodiaeth llwybr URL lle i osod y middleware, er enghraifft "/styles/apps".


serveDir

serveDir: string

Arbrofol

Cyfeiriadur lleol i wasanaethu ffeiliau ohono.


extension

extension: string

Arbrofol

Gwasanaethu dim ond ffeiliau y mae eu llwybr URL yn gorffen gyda'r estyniad hwn, er enghraifft ".css".


contentType

contentType: string

Arbrofol

Gwerth ar gyfer pennyn ateb Content-Type.


pathTransform?

optional pathTransform?: (urlRelativePath) => string

Arbrofol

Trawsnewid dewisol a geir ei gymhwyso i'r llwybr cymharol i'r URL cyn ei ddatrys yn erbyn serveDir, er enghraifft (p) => p.replace(//([^/]+)\.css$/, "/$1/app.css").

Paramedrau

urlRelativePath

string

Yn dychwelyd

string