function
devUrlFor
export function devUrlFor(id) { ... }The URL a NUL-prefixed module is served at in development.
Readiness: Implemented
API reference
Vite, driven by uf.config.js: every Flow module through `uf transform`, MDX, the file-system router and static rendering as Vite plugins.
Written from the source by uf doc when this site was built: the signature and the comment above each export, grouped by the specifier a program imports it from.
@uniflowed/vitefunction
devUrlForexport function devUrlFor(id) { ... }The URL a NUL-prefixed module is served at in development.
function
defaultexport default function uniflowed(options = {}) { ... }uf's Vite plugins.
function
flowTransformexport function flowTransform(options = {}) { ... }The Flow transform alone: uf:flow's transform half, without the refresh wrapper, the virtual modules or the dev server.
For a Web Worker. Vite bundles a worker with worker.plugins and never with plugins, so a worker written in Flow reached the bundler as Flow and the build failed with "Flow is not supported" (ubugeeei-prod/uf#1676). uf dev never saw it, because a dev server serves a worker through the ordinary pipeline, where uf:flow already runs.
A worker bundle has no document, no stylesheet and no refresh runtime, so this compiles and returns the code and nothing else. Vite calls worker.plugins once per worker bundle, so each call is a fresh plugin with its own uf transform, closed when that bundle ends.
@uniflowed/vite/driver@uniflowed/vite/mergefunction
mergeConfigexport function mergeConfig(base, overrides) { ... }Deep-merge overrides onto base.
Plain objects merge key by key; arrays and everything else replace, which is what a caller setting build.rollupOptions.input means. plugins is the exception and is handled by the caller, because concatenating is right there and replacing is right everywhere else.
function
withProjectConfigexport function withProjectConfig(generated, overrides) { ... }uf's generated config, with the project's Vite config merged over it.