/** * The BUILD-TIME half of `@ultimat3/render` — the loaders and the route → bytes pipeline — split * off because `css-modules.ts` imports `node:url`, whose browser polyfill exports neither name it * asks for: one barrel carrying both halves could not be bundled for a browser at all (axiom 6). * Disjoint from `@ultimat3/render` by construction, which `server.test.ts` checks. */ import { installRenderLoader } from './module-loader'; // A side effect on import, deliberately, and the reason this barrel is named in `sideEffects`: a // Bun plugin only transforms modules loaded AFTER it, so the install has to happen before any // `.tsx` route or `.scss` module is imported. It lives on THIS barrel rather than on // `@ultimat3/render` because the loader is build-time code — a browser bundle that reached it // would carry `sass` and `node:fs`, which is the defect this split closes. installRenderLoader(); // ---- scss → css, and the scoped class map every `import styles from` receives ------------------- export type { CompiledStylesheet } from './css-modules'; export { compileStylesheet, isCssModule, isGlobalStylesheet, scopeClasses, stripCharset, } from './css-modules'; // ---- the two Bun loaders: `.tsx` → the server JSX factory, `.scss` → css + a class map ---------- export type { Stylesheet } from './module-loader'; export { claimStylesheets, clearStylesheets, installRenderLoader, loadStylesheet, registeredStylesheets, setStylesheetRoot, stylesFor, stylesheetsRevision, transformTsx, } from './module-loader'; export { enumeratePrerenderEntries } from './prerender-enumerate'; // ---- the render pipeline: one entry point per mode ---------------------------------------------- export type { HoleEnter, HoleSink, HoleSinkOptions, RenderHtmlOptions } from './render-html'; export { holeSink, ROOT_ELEMENT_ID, renderComponent, renderToHtml } from './render-html'; export { DEFAULT_ISR_REGENERATE_DEADLINE_MS, invalidateAndRevalidate, isrController, } from './render-isr'; export { DEFAULT_ISR_FAILURE_COOLDOWN_MS } from './render-isr-cooldown'; export { ISR_LOCALE_PARAM, isrKey, isrRequestUrl, undeclaredQuery } from './render-isr-key'; export { isrRouteFor } from './render-isr-routes'; export type { IsrAnswer, IsrEntry, IsrState, IsrStore, IsrTagFence, MemoryIsrStore, MemoryIsrStoreOptions, } from './render-isr-store'; export { DEFAULT_ISR_MAX_BYTES, DEFAULT_ISR_MAX_ENTRIES, memoryIsrStore } from './render-isr-store'; export type { IsrDisk, IsrDiskEntry, StorageIsrStoreOptions, } from './render-isr-store-storage'; export { storageIsrStore } from './render-isr-store-storage'; export type { IsrController, IsrControllerOptions, IsrFence, IsrRendered, IsrRenderFn, IsrServeResult, } from './render-isr-types'; export type { SsrOptions, SsrRenderFn, SsrRenderInput } from './render-ssr'; export { renderSsr, ssrHeaders } from './render-ssr'; export type { StaticArtifact, StaticBuildOptions, StaticRenderFn } from './render-static'; export { assertNoPerRequestState, contentHash, enumeratePrerender, fillPath, renderStatic, staticHeaders, staticResult, } from './render-static'; export type { StreamHole, StreamOptions, StreamPlan } from './render-stream'; export { collectStream, DEFAULT_HOLE_TIMEOUT_MS, DEFAULT_STREAM_KEEPALIVE_MS, holeId, holeMarker, REVEAL_SCRIPT, renderStreamHtml, revealChunk, STREAM_KEEPALIVE_CHUNK, streamResult, } from './render-stream'; // ---- the Sass compile cache: where it lives, and how often this process ran Sass instead -------- export { sassCompilations, setSassCacheDir } from './sass-cache'; export { serverTsxBuildPlugin } from './tsx-build-plugin';