uf0.49.0

Type to search every page and heading. Page titles only, while the full index loads.

All pages

Readiness: Implemented

API reference

@uniflowed/vite

Vite, driven by uf.config.js: every Flow module through `uf transform`, MDX, the file-system router and static rendering as Vite plugins.

0.49.05 documented exports, 5 without a doc commentnpm/vite

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/vite

function

devUrlFor

export function devUrlFor(id) { ... }

The URL a NUL-prefixed module is served at in development.

function

default

export default function uniflowed(options = {}) { ... }

uf's Vite plugins.

function

flowTransform

export 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.

Without a doc comment

@uniflowed/vite/driver

Without a doc comment

@uniflowed/vite/merge

function

mergeConfig

export 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

withProjectConfig

export function withProjectConfig(generated, overrides) { ... }

uf's generated config, with the project's Vite config merged over it.