Skip to content

oj v0.5.0

Choose a tag to compare

@github-actions github-actions released this 30 Nov 11:16
· 21 commits to main since this release
79d3cd5

Added

  • Golden tests for oj build against vite build: small apps under crates/oj/tests/golden/<case>/app (two of Vite's own playgrounds, css-codesplit and css-no-codesplit, built as they are; a page without scripts under a base; empty and styled CSS entry points; CSS url() queries, percent-encoding and public files; postcss-import's layout of inlined sheets; asset imports with extra queries; an inline source map after the preload rewrite; debug ids and the dependency ignore list; a virtual module's glob with postfixed imports; library output options with an absolute entry; treeshake, minify and comments as objects; resolution defaults; one stylesheet in css-post's collect order, CSS modules with an unused import, localsConvention, keyframes and a composes diamond, source maps of globs and variable imports, an entry with exports, an external URL base, a library under esbuild without identifier mangling, Node builtins in a browser build, an entry with a lazy import, stylesheets and a CSS module, assets inlined and emitted and a public directory, module and inline workers in both worker.formats, build.manifest, import.meta.glob and import.meta.env, a library in es and cjs and one in umd, build.sourcemap, build.minify: "esbuild", two HTML pages sharing a module, a JSON import, import(./x/${name}.js), base: "./" and base: "/app/", define, TypeScript with an enum and a JSX pragma, build.modulePreload: false, a React app with @vitejs/plugin-react, svgr and MDX, Tailwind through a postcss.config.js, a regex alias with tsconfig paths and the package's imports map, every import.meta.glob form, a large app's build block (esbuild minify, hidden maps, chunk groups by tag and share count, a chunk name function), an app's own plugins' hooks, CSS url() assets with a font and image-set(), Sass, Less and Stylus, build.cssCodeSplit: false, lazily imported stylesheets, a page's own assets with an inline module and an env placeholder, a CommonJS dependency, WebAssembly by ?init and ?url, an object input with output name patterns, externals, esbuild.drop, an unminified build, a lowered build.target, and a TanStack Start app's client under thirteen configurations: server functions with validators and middleware, route code splitting with lazy route files, nested and pathless layouts with params, route assets with a glob and a worker, defines per environment, the chunk groups a large app pins (named by a function, by tag and share count), an app plugin scoped to the client environment, isomorphic, server-only and client-only functions with a request middleware on the Start instance and zod-validated server functions, search params validated with zod with loader deps, a redirect in beforeLoad, typed params, notFound, static data and head links and scripts, Tailwind v4 through a PostCSS config with a CSS module composing from another and a Sass sheet, svgr components under a base path with public files and no inlining, React.lazy with a dynamically imported sheet, a glob of sheets and a variable import under a component-and-loader split, and esbuild's minifier with an older target) are built by oj and compared file by file, hashes normalized, with the vite build output recorded under expected/ from the Vite whose rolldown oj embeds (OJ_UPDATE_GOLDEN=1 OJ_GOLDEN_VITE=<node_modules> cargo test --test build_golden re-records). A case leaning on React, the Start plugin or Tailwind records with the fixture's install of them and the Vite OJ_GOLDEN_VITE names, so the two builds see one version of each. Four cases record a known difference and are ignored until it is closed: a Start app under build.cssCodeSplit: false (Vite gathers the client's CSS into one style-<hash>.css with a manifest row keyed style.css, which Start links at the root route; oj's Start build still writes a sheet per chunk), a TanStack Start app's client (every chunk's code, the HTML and the manifest match; a few map segments differ; the server is oj's own Node runtime, not compared), the Start assets app under build.sourcemap (start-sourcemap: the maps name the same sources, a ?url asset's module among them and never a ?raw file's or a sheet's; the tokens of a worker's new URL(…, import.meta.url) and a route's import expression's column differ), and the bundle a plugin's writeBundle sees in a plain build (no index.html in it: the page is rendered after the hooks). Later cases: new URL(file, import.meta.url) in every form (a file, a worker, a template, a public file, a missing file, a data URL), an HTML file and a public URL imported with ?url, a vite-ignore script under a base, a percent-encoded base, a Start app naming every asset through assetFileNames, CSS modules with global keyframes and @value, conditional CSS imports, and an .ico inlined; from the seventh review: the ssr manifest in three configurations, the html-proxy index with a <style>, a type="MODULE" script, HTML asset queries, an inlined entry's asset, an aliased stylesheet link, public/ under a library and an SSR build, an SSR build in cjs, with several inputs and with emitAssets, TypeScript, inline, unused and relative-base workers with their output names, import.meta.env in a worker, a public file ?inline over the limit, an assetsInlineLimit function, WebAssembly ESM integration, a backslash in an inlined SVG, an ?inline sheet's assets in the manifest, CSS modules unminified and with exportGlobals, a .scss imported from .css, and a Start app under NODE_ENV=development, per-environment sourcemap and minify, and with an unused ?url sheet.
  • Nine goldens recorded from vite build for what a large TanStack Start app's build relies on: a Cloudflare app with its own Worker entry, output guards and renamed chunks (the whole dist compared, its server known gaps named in the harness); selective SSR with prerendering; chunk groups from a plugin's closure; plugin state crossing from the client build to the server; deep asset imports (a package sheet, raw, JSON, MDX, globs, a worklet URL, flag-gated imports); Tailwind layers, sources, custom variants, a TypeScript plugin and a package sheet chain through PostCSS; Start plugins running the app's own Vite inside the build; dependency resolution by condition, browser field and nested node_modules; a --mode development Start build. The harness runs a case under a recorded --mode, compares source maps by presence where Start's known map gaps apply, and levels build-time stamps, and numbers two files of one name apart from the hash by their content, which is the same on every machine (their hashes are not: rolldown hashes the module paths in a chunk's comments, which climb to the checkout).
  • The plugin host's engine has a test for require() of an ES module under a module customization hook, through a plugin's own vite.createServer and ssrLoadModule inside oj build.
  • Seven more goldens for what a large Start app's build relies on, recorded from vite build: the Sentry plugin in its inject-only shape (a debug id in every chunk, hidden maps, a worker, no release injection); StyleX compiled as a library and an app by two @stylexjs/unplugin instances appending layers to one linked sheet; JSON over the stringify: "auto" threshold with named imports, import attributes and a package's JSON; the import.meta and env forms a build folds (HMR guards, a dev-gated raw glob, optional env reads, a server-only import); a Cloudflare app whose dependency imports WebAssembly under the workerd condition beside ?init and ?url; escaped route segments, an ignored test file and a public directory with dot entries; and an app whose Vite is patched (app/vite-patch.json, which the harness applies to a copy of the fixture's Vite for both builds, so a patched preload helper is pinned). The harness levels debug ids (rolldown's derive from the chunk's hash, Sentry's from the text it hashes, both covering module paths that climb to the checkout). The start-app fixture installs @sentry/vite-plugin and @stylexjs/unplugin for them.
  • Unit tests for the plugin host's build post plugins (the modern flag's plugin beside a hosted renderChunk and the text it leaves the app's plugins, a ?worker bundle's esbuild minifier under shared plugins and without, a binary asset emitted from a hook, the sourcemapDebugIds fact), and for the bundle's side of them (a hook's asset entry merging its names and decoding its bytes, a deduped asset's manifest rows, a worker bundle's minify, .wasm?init among the asset tags).
  • The golden harness checks source-map fidelity for the Start cases whose maps it compares by presence: every map on both sides names the same sources with the same contents for the app's files, and resolves at least 99.9% of the recorded map's mappings to the same source line and 90% to the same column (a stack trace symbolicated through either map lands in the same place), with one map held to bounds of its own and the reason named (a Cloudflare case's server-function provider chunk, whose synthesized handler declaration Start's compiler leaves unmapped).
  • A golden for a Cloudflare Start app built with resolve.preserveSymlinks: true (start-preserve-symlinks), recorded from vite build and compared whole: the option Vite copies into every environment's resolve options stops its resolver realpathing, and rolldown's resolve.symlinks is its negation, so each environment's manifest keys, map sources, module-path comments and the ?worker bundle keep every dependency's id under the app's root. Both environments' manifests and hidden maps, the Worker's plugin set and its output are what the case pins under the option.

Changed

  • The TanStack Start fixture the tests build (e2e/fixtures/start-app) installs sass (Vite compiles a Sass sheet with it; oj compiles one natively) and runs Vite 8.4.0-beta.1 with rolldown pinned to 1.3.2, the rolldown oj embeds, so the golden tests record from it and a Start build's preload helper (read off the app's Vite) is the recording's.
  • oj build: a plugin's generateBundle and writeBundle get the bundle's metadata, and read a chunk's code or an asset's source from oj when they ask for one. oj used to copy every chunk's code and every asset's source (the source maps' JSON included) into the hook call, several times over on the way into the plugin host, and take the whole bundle back as the hooks' reply: on one large TanStack Start app that round trip was the build's peak memory, 2.5 GB over the 8 GB the client bundle's render already held, and 19 seconds of its wall clock. The text now stays in oj, a hook reading chunk.code gets it then, and the reply carries only the text a hook assigned; what a hook reads, assigns, deletes or emits comes out as under vite build. The same build peaks at 9.0 GB instead of 10.7 GB and takes 1:38 instead of 2:26.
  • oj build of a TanStack Start app: the client bundle is let go of before the server (or Cloudflare Worker) bundle builds. The client's bundler and its output (every chunk's code and source map, the whole dist/client in memory) were kept until the build ended, and the plugin host kept its heap as the client build had left it, so the server bundle grew on top of both: one large app's build held 8.3 GB when it ended. Both are dropped once the client's manifest is written, the freed heap goes back to the OS, and the plugin host runs a full collection as the build switches environments; the same build now runs its server bundle from 2.1 GB instead of 8 GB and ends at 4.4 GB. Its peak (9.9 GB, inside the client bundle's own render, as vite build's is) is unchanged.

Fixed

  • oj build: the command line is the inline config the config file's config hooks see, as Vite's CLI hands it to resolveConfig (--base, and --outDir, --assetsDir, --sourcemap, --minify, --manifest, --ssrManifest, --ssr, --target, --emptyOutDir under build), in a plain build and a TanStack Start one. Start's config hook derives the client's output directory from build.outDir; oj ran the hooks without the flags and then honoured the environments.client.build.outDir they declared, so oj build --out <dir> of a Start app wrote the client under the project's own dist/client.
  • oj build: the build's plugin hosts resolve the config file under the command line's inline config as well (they ran its hooks over the file alone, so a Start host derived the client's output directory from the file's build.outDir with --outDir given, apply(config) saw no flags, and oj build --minify esbuild on a config that did not name the minifier added no esbuild pass while rolldown's was off: the output was not minified), and vite build --ssr <entry> is the inline build.ssr Vite computes isSsrBuild from before the file loads and merges over the file's own: oj passed isSsrBuild: false and let the file's value win.
  • oj build of a TanStack Start app: a server module naming ClientOnly and no server function or environment function is compiled under a plugin host too, so its <ClientOnly> children leave the server bundle as Start's compiler (whose server filter matches on that name) makes them; oj skipped the module's compile when it named no factory. The dead-code pass's rule for a removed statement now counts a directive prologue ("use client" with no ;) as an unsafe predecessor, and the provider's removal of an export { … } list goes through the same rule; both left two statements that could join ("use client" then [a].forEach()).
  • oj build of a TanStack Start app: build.assetsDir is honoured whatever its shape, as Vite joins it into assetFileNames: a nested one (static/js) puts the chunks' sheets, the emitted files and the manifest rows under it (oj wrote the sheets under static/static/js and the hooks' bundle listed no CSS asset), an empty one puts them at the output root (oj kept assets/ for them while the chunks sat at the root), the server environment's own assetsDir applies to the sheets its bundle emits (oj used the default beside its chunks), and a worker bundle's files take the top-level build.assetsDir, as Vite's worker plugin reads it (oj took the client environment's).
  • CSS @import inlining follows postcss-import's skipDuplicates (its default): a file imported twice under one condition chain, directly or through two children, is inlined once, and two files of one text neither of which imports anything are one; under another chain (a layer, a media query) a file is inlined again. oj inlined every import, so a shared base sheet repeated. An empty @layer statement after a rule stays where it is (only one met before any rule is hoisted with the imports), an @import with a query (./x.css?inline) is left as written, as the plugin leaves a URL with a search string, a cyclic import is dropped as the plugin drops it (oj kept the statement for the browser), and an empty file inlines nothing, with the plugin's warning.
  • oj build: a public file imported with a query keeps every parameter but url in its built URL (/pub.png?no-inline stays), as Vite's publicFileToBuiltUrl does; oj dropped no-inline there too.
  • oj build of a TanStack Start app on a Node server: cloudflare:workers resolves to the same shim the dev SSR uses (its env the wrangler vars), so a server function reading its bindings runs under node server.mjs as it does under oj dev; under the Cloudflare plugin workerd's own module serves it, as before.
  • oj dev: the html-proxy script an inline <script type="module"> becomes is written with its URL HTML-escaped (src="/index.html?html-proxy&amp;index=0.js"), as Vite 8.4's dev HTML transform writes it (escapeHTML on the attribute); the browser requests the decoded URL as before.
  • oj dev --debug=hook-gate prints each plugin container's hook plan (the filters the gates read) along with the gate's skips.
  • Plugin host: a plugin returned by applyToEnvironment takes its parent's place in every ordering (Vite splices the returned plugins in where the parent sits and does not sort again), its own enforce notwithstanding. oj gave it the parent's place against Start's compiler alone, so in a Start build an enforce-less child of an enforce: "pre" parent ran before the compiler and again with the normal plugins (a transform that appends an export then declared it twice, and rolldown failed the build), and in a plain build it ran after vite:oxc's slot, on lowered code, instead of before it.
  • oj dev: a literal vite.config read in Rust (the boot that starts no JS engine) carries worker.format as the engine's extraction does (Vite's default "iife"); the two outputs differed by that key.
  • oj build: worker.format is honoured, with Vite's default "iife". A ?worker import, a ?worker&inline one and a new Worker(new URL(...)) built one classic script, wrapped in a function as rolldown's iife writes it (its dynamic imports inlined, its import.meta rewritten as Vite's worker plugin rewrites a classic worker's), started with { name: options?.name } and, inline, from a Blob URL that revokes itself, as Vite's worker plugin writes each; "es" keeps the module worker. oj bundled every worker as a module and started it with { type: "module" } through a wrapper of its own, whatever the config said (the config's worker.format was not read in a plain build, with a warning that the whole block was not applied).
  • oj build with build.minify: "esbuild": rolldown's minifier no longer runs on top of esbuild's. Vite hands rolldown minify: false under that setting and minifies each chunk in vite:esbuild-transpile's renderChunk; oj left rolldown's own minifier on as well, so chunks were minified twice, and esbuild saw the preload helper's __VITE_IS_MODERN__ flag unreplaced (the import analysis plugin ran after the host's), which left a padded true in the output.
  • oj build: a library build (build.lib) declares its top-level bindings with var, as Vite's topLevelVar: true output option has rolldown do for every build; oj set it for the app build alone, so a library's const stayed.
  • oj build: the preload helper module is Vite 8.4's (failedCssLinks: a stylesheet whose preload failed is tried again on the next import of a chunk needing it); oj carried an earlier revision.
  • oj build: the source map of a chunk the import analysis rewrote (one with a dynamic import, which is every route chunk and the entry) is composed as Vite composes it: the map its import analysis writes after the preload markers are filled in (@ampproject/remapping over the chunk's) drops a segment that repeats the one before it and a sourceless segment at a line's start or after another (gen-mapping's maybeAddSegment), and lists a name once. oj kept every segment of the composition, so under build.minify: "esbuild" with build.sourcemap every such chunk's map had a few segments and names Vite's has not.
  • oj build of a TanStack Start app: an import the compiler's dead-code pass removes (one only a server function's handler used) leaves nothing behind where the statements around it keep apart without it (another import or an export follows, or the one before ends in ;, or in the } of a declaration or a block, an exported one included; an expression ending in }, export default {} among them, keeps the ;, as a call could continue it); oj left a ; in its place, and the lowering, which adds the JSX runtime's import after the last import of the leading run, put it before the imports that followed the ;, so a route chunk's modules came in another order than under Vite (an asset module after the component's own statements) and its map differed.
  • oj build of a TanStack Start app: an asset module (?url, a bare svg) is loaded with no source map, as vite:asset loads it, so the chunk's map lists the asset's source as Vite's does, and the module's text has no trailing semicolon, as Vite writes it; a stylesheet's, a worker's and a ?raw file's module keep Vite's empty map (vite:asset returns one for ?raw).
  • oj build: the bundle a plugin's generateBundle and writeBundle see lists the chunks' stylesheets as assets, named as Vite's css-post names them (index.css, with the chunk's facade module as the original file name), every chunk's viteMetadata.importedCss, and an asset a hook emitted earlier in the build (in buildStart, in a transform); the .vite/manifest.json asset is in it only with build.manifest on. oj's plain build wrote its stylesheets after rolldown's hooks ran, so a plugin reading a chunk's sheets or the bundle's assets (a preload-header plugin, one appending to a sheet) found none. The page itself is still rendered after the hooks, so writeBundle's bundle has no index.html yet.
  • oj build: a chunk of nothing but stylesheets (a lazily imported sheet, a module importing only sheets) leaves the bundle, as Vite's css-post drops it: the chunks that imported it lose the import (a /* empty css */ comment of the same length takes the statement's place, so their maps hold) and take over its sheets in their css and manifest rows, the dropped chunk's sheet keeps a manifest row keyed by the chunk's original file name (src/theme.css, as rolldown keys an asset emitted under one), and a dynamic import of it resolves to an empty module with its sheets preloaded. A chunk is pure as css-post sees it: no exports, a sheet, no CSS module (its class map is JS), and either every module a sheet or no code left. The TanStack Start build had this; the plain build kept the empty chunk and its import.
  • oj build: rollupOptions.external takes RegExps as well as strings, matched as rolldown matches them; oj dropped a RegExp. An import by URL (https://…, //cdn/…) stays an import: rolldown externalizes one that no plugin's resolveId took, as it does under Vite, so oj adds no rule of its own for it.
  • oj build: a ?init WebAssembly module is Vite's: it imports initWasm from Vite's wasm helper module (a compile that streams when the server says application/wasm, reads a data URL otherwise) and is inlined as a data URL when the file is under build.assetsInlineLimit, as any asset; oj wrote a helper of its own and always emitted the file.
  • oj build: a stylesheet's image-set() candidates and the url()s of a ?inline sheet are rewritten to the emitted or inlined assets, as Vite's url rewrite does, and the ?inline sheet is minified alone under build.cssMinify (Vite's minifyCSS for an inlined sheet, without a trailing newline) and kept as compiled otherwise, its at-rules where they are; oj left them as written.
  • oj build: a generateBundle hook's edit to a stylesheet oj wrote (the sheets ride along in the hooks' bundle) is not written over the sheet by rolldown under its old name; the plain build writes its sheets after the hooks and warns that the edit is not applied.
  • oj build: a plain build's vite:oxc slot takes the modules the environment's resolved oxc.include/oxc.exclude and a plugin's Fast Refresh include name, as the TanStack Start build's did; it ran with the default filter.
  • oj build: when the plugin host cannot read the resolved output options, the build goes on with the config's static values and a warning; it failed.
  • oj build of a TanStack Start app: a ?raw import of any file comes with Vite's empty map, as vite:asset loads it (map: { mappings: "" }), so the chunk's sourcemap names no source for it; oj gave a ?raw text file the asset's missing map, which listed the file.
  • oj build: a dropped pure CSS chunk's sourcemap leaves the hooks' bundle and the size report with the chunk, as css-post deletes both. A chunk is pure only when it rendered to nothing at all (css-post's code === ""), and the /* empty css */ comment takes an import with any whitespace before its specifier, as Vite's replacer does.
  • oj build: a plain build with no plugin host (or a host that read no oxc fact) lowers TypeScript and JSX by vite:oxc's default filters (include: /\.(m?ts|[jt]sx)$/, exclude: /\.js$/), as Vite hands them to the native transform when the config names none; a .mts module went unlowered.
  • oj build: a generateBundle hook's rename or removal of a stylesheet oj wrote is reported as not applied, as a change to its source is; both were silent.
  • oj build: the source map of a chunk the import analysis rewrote lists only the sources its segments reference, in first-use order, as @ampproject/remapping builds them; oj kept rolldown's list, a module loaded with an empty map (a sheet's, a ?raw file's) among them.
  • oj build: augmentChunkHash reads the sheet renderChunk recorded for the chunk instead of compiling the chunk's CSS a second time.
  • oj build with build.cssCodeSplit: false: the one stylesheet joins the chunks' CSS in the order Vite's css-post collects it (each entry chunk in bundle order, a chunk's static imports before its own modules' sheets, then the chunks reached by dynamic import); oj sorted the sheets by path, which could reorder the cascade.
  • oj build: an unused CSS module import leaves the bundle with its sheet, as under Vite (css-post gives a class map module no side effects); oj kept every compiled sheet's module.
  • oj build: a chunk's stylesheet is named as Vite's css-post names it: the entry's basename, else the chunk name with its extension replaced (routeTree.gen → routeTree.css, a group's i18n/strings keeps its directory), sanitized as rolldown sanitizes a file name (a space or a non-ASCII letter stays); oj replaced everything outside [A-Za-z0-9._-] with _.
  • oj build: the stylesheet asset of the hooks' bundle is named by its stem however rolldown's hash is spelled: the hash alphabet has -, and oj split at the last -, so one sheet in eight kept name as index-BX-FufQ8.css (what StyleX's getAssetBaseName reads).
  • oj build: an .svg?inline import is Vite's URL-encoded data URL, as assetToDataURL writes an svg; oj encoded it base64.
  • oj build: an asset's manifest row is { file, src }, as rolldown's manifest writes it (a name only for a CSS entry's sheet); oj added name.
  • oj build: a module the glob, variable-import or new URL expander rewrote keeps its source map (a line map, as Vite's native plugins return one); oj returned the code with no map, which made rolldown drop the module's mappings under build.sourcemap.
  • oj build: an app build keeps no entry signature (Vite's preserveEntrySignatures: false), so an entry module's unused exports are tree-shaken as under Vite; oj kept rolldown's default. rolldownOptions.preserveEntrySignatures is read when the config sets it, and a plugin's this.emitFile({ type: "chunk", preserveSignature }) keeps its chunk's signature as Rollup's does.
  • oj build: an external URL base (https://cdn.example.com/app/) is kept as written, as Vite's resolveBaseUrl keeps one in a build; oj prefixed it with /. And import.meta.env.BASE_URL is the resolved base as the config spelled it (/app stays /app); oj added a trailing slash.
  • oj build: a library under build.minify: "esbuild" is minified by vite:esbuild-transpile alone; oj ran rolldown's minifier on top. A library inlines every asset, as vite:asset does under build.lib.
  • oj build: the esbuild minifier takes Vite's resolved options: minify: false with the three minify* flags when any is set (esbuild: { minifyIdentifiers: false } was ignored), an ES library keeps its whitespace, and useDefineForClassFields defaults to false only when the compiler options name neither it nor a target.
  • oj build: a plain build answers a Node builtin a browser bundle imports with Vite's __vite-browser-external stub, and an import a package lists as an optional peer dependency with Vite's throwing module, as the TanStack Start build did; it failed the build as unresolved.
  • oj build: the lang of a queried module id is read as vite:oxc reads it, off the id as written when its tail is a script extension (App.vue?vue&type=script&lang.ts), else off the id without its query; oj failed such a module.
  • oj build of a TanStack Start app: a chunk's stylesheet is finished whole, as Vite's finalizeCss runs on the concatenation (the at-rules hoisted, one minify), so rules two modules share merge and a later module's @import moves up; oj minified each module's sheet alone and joined them.
  • oj build: a ?url import's data URL carries mrmime's types: m4a is audio/mp4, and jfif/pjpeg/pjp, which mrmime does not know, are an octet stream.
  • oj build: a dynamic import's preload dependencies are looked up under the chunk's directory as Vite joins the path (path.posix.join), the query dropped; oj's join let a root-led specifier escape the directory.
  • oj build: Vite 8's top-level input (and an environment's input) is the build's input when build.rolldownOptions.input names none, as Vite falls back to it; oj built only index.html for a config written that way (every Vite playground is).
  • oj build: the config's environments.<env>.build values (sourcemap as "inline"/"hidden" too, minify, outDir, assetsDir, copyPublicDir, cssCodeSplit, emptyOutDir, manifest, emitAssets), json.namedExports/json.stringify, oxc.jsxInject/esbuild.jsxInject and envDir: false reach the build from a Vite config; envPrefix: "" is refused with Vite's message (every variable would be exposed) and envPrefix: [] exposes nothing; define: { X: undefined } is undefined; the native-loader warning variable no longer leaks into import.meta.env; .env files are parsed as node's parseEnv parses them and expanded as dotenv-expand expands them (${X:-d}, ${X-d}, ${X:+y}, the process environment winning).
  • oj build source maps: the preload rewrite keeps the wrapped import's segments and the __vitePreload name (they were blanked); an inline map (build.sourcemap: "inline") is remapped and re-embedded after the rewrite; the default sourcemapIgnoreList is /node_modules/; sourcemapDebugIds, sourcemapBaseUrl and sourcemapExcludeSources are forwarded.
  • oj build: import.meta.glob through an alias ending in a slash, inside a plugin's virtual module, through tsconfig paths and package.json imports patterns, as rolldown's native plugin resolves them; a #… variable import resolves through package.json imports; a module with a ?query or #hash no plugin loads is read from the file, as Vite's last plugin (vite:load-fallback) reads it.
  • oj build: a library build takes rollupOptions.external and output.globals, paths, banner, footer, intro, outro, exports, extend, name, hashCharacters; an absolute build.lib.entry resolves; Vite's comments rule and the identity define for process.env.NODE_ENV apply (Vite leaves it to the consumer); import.meta.env.<unknown> is undefined in every bundle.
  • oj build: module resolution defaults are Vite's: resolve.extensions (.mjs before .js before .ts), the client's mainFields with jsnext:main/jsnext, the browser field remap only when mainFields names browser, the development/production condition from the mode.
  • oj build of an SSR bundle: topLevelVar, Vite's entry and chunk names by the package's type ([name].js under "type": "module", .mjs otherwise; chunks under assets/), a truthy top-level build.minify.
  • oj build: output.hashCharacters, exports, externalLiveBindings, keepNames, minify and comments as objects and treeshake as an object are forwarded (an HTML entry stays alive under moduleSideEffects: false, as Vite's html plugin keeps it); every other output key oj drops is reported.
  • oj build: an HTML input with no module script and no stylesheet is emitted as a page (it failed the build); pure CSS chunks are dropped under build.cssCodeSplit: false too; sheets and CSS url() files with identical bytes are one file, as rolldown's file emitter dedupes them (first wins); a ?url stylesheet is emitted with its name and original file name, so the manifest keys it by its source and the importing chunk lists it under assets; an empty CSS entry point is a .css asset with Vite's manifest row (isEntry, names) and no JS placeholder; a sheet that minifies to nothing is empty, not a newline.
  • oj build: CSS url()s follow vite:css: ?no-inline emits and drops the query, ?inline inlines whatever the size, percent-encoded urls are decoded before resolving, a public file's url gets the base (../pub.png under a relative base), only an svg with a fragment is exempt from inlining, the original quoting is kept (a " added only where encodeURI would change the url or it holds a )), @import url( and xurl( are left alone; inlined @imports are laid out as postcss-import lays them out (later @charsets dropped, @layers first, the raws rules of its printer) and a misplaced @import is dropped with Vite's warning.
  • oj build: an asset import with extra query parameters (./x.svg?no-inline&foo=bar, ./a.png?v=1, /pub.png?foo=1) keeps its postfix on the built URL, as vite:asset does; oj failed or dropped it.
  • oj build HTML: <style> blocks and style="" attributes are processed (urls under the base, @imports inlined, PostCSS/Tailwind when configured, minified under cssMinify, </style escaped); modulepreload, preload and prefetch links are never inlined; a classic <script src="/public.js"> gets the base; import("…") inside a classic inline script is rewritten; asset URLs are decoded before resolving and encoded as Vite encodes them; vite-ignore is removed from scripts too, as the attribute alone; <script type="importmap"> moves before the first module script; a %VITE_X% define keeps its raw text when it is not a string; env placeholders inside inline module scripts are replaced; HTML-referenced assets get manifest rows and join the page's assets; a deduplicated asset gets a row per original file name; CSS url() rows survive a relative base; a chunk's assets are ordered as Vite orders them (JS, CSS, HTML).
  • oj build: a worker referencing itself (new Worker(new URL("./self.js", import.meta.url)), ?worker&url of itself) is self.location.href, as Vite writes it; only a deeper cycle errors. Worker bundles carry the default sourcemap ignore list.
  • oj build of a TanStack Start app: srcDirectory, router.entry and start.entry come from the aliases Start resolved (an app under app/ builds; the route tree's footer imports the router from where it is); build.assetsDir, build.copyPublicDir: false and environments.client.build.outDir are honoured; an app with no src/client.tsx keys its manifest entry by the framework's default entry, as Vite keys it; the Start build loads a ?query/#hash module through the same fallback as Vite.
  • oj dev of a TanStack Start app with Tailwind: the dev server's SSR renders again. Since 0.5.0's Tailwind change the styles compiler told the Tailwind engine every compile was a production build's, the engine set NODE_ENV=production for the whole process, and the SSR engine then loaded React's production jsx-dev-runtime, whose jsxDEV is undefined (_jsxDEV is not a function on every page). The engine is told the app's mode.
  • oj build: a chunk sheet's url() files get manifest rows keyed by their source relative to the root (src/bg.svg) and join the chunk's assets, as vite:asset emits them with that original file name and css-post records them on the chunk; oj listed neither. Under build.cssCodeSplit: false the one sheet's row is style.css and no chunk lists it under css, as Vite writes them.
  • oj build: a library's renderChunk hooks get the output format they render (cjs for the cjs file), so vite:esbuild-transpile minifies a cjs library as cjs; the host said es for every format, and esbuild wrapped the cjs chunk as a CommonJS module of an ES one.
  • oj build: a variable dynamic import through the app's alias (import(\@/pages/${n}.tsx`)) is expanded relative to the importer, as rolldown's dynamic-import-vars resolves it; a template without a file extension, a bare one, or one under /* @vite-ignore */ is left as written and a query (?raw) becomes the glob's queryoption, as the native plugin writes them; oj expanded any relative template and wrote the query into the pattern. The helper module is rolldown's text, andimport.meta.globlists files as the native plugin walks them (a directory's files where the directory stands, dot-led entries andnode_modulesskipped below the root) with itsquery` object spelled raw.
  • oj build of a TanStack Start app: an isomorphic function built on a module variable (const iso = createIsomorphicFn(); export const x = iso.server(a).client(b)) is compiled through the binding, as Start's compiler resolves it; oj left the chain, and the runtime stub ran the server implementation on the client. A bare createIsomorphicFn() keeps its call and import; a renamed createServerOnlyFn import compiles at module level only; a replacement under a TypeScript wrapper (!, as, satisfies, an assertion, extends) is parenthesized as Babel prints it; the server-function provider keeps every statement Start keeps (a side-effect call, an unused function) and passes the handler alone; a typeof x in a type annotation is no read of x, as Babel's scope sees it, so the import goes where Vite's build drops it.
  • oj build and oj dev: a CSS module's localsConvention keeps the map in source order (foo-bar, fooBar, baz), keyframes names export where postcss-modules' walk meets them (after the rules that reference them), an animation reference without its @keyframes is exported too, and a file composed through two routes is written once, children first, as postcss-modules' loader writes it.
  • oj build of a TanStack Start app: a file under public imported by its root-absolute URL (import robots from "/robots.txt?url", a /logo.png no file under the root answers) is its own module exporting the URL under the base, as vite:asset's checkPublicFile serves it; the Start build failed the import as unresolved (the plain build already took it).
  • oj build of a TanStack Start app: a variable dynamic import (import(../locales/${lang}.ts)) is expanded as Vite's dynamic-import-vars expands it, a call of rolldown's helper over the glob of the files it can name, so the files become dynamic entries with manifest rows and the helper module resolves; the Start build left the import as written.
  • oj build and oj dev: a CSS module's class map lists its locals in the order the sheet declares them, as postcss-modules exports them under Vite's default PostCSS transformer (the lightningcss transformer sorts them); oj sorted them by name, so a chunk's bytes and hash differed.
  • oj build and oj dev: a CSS module composing from another file (composes: tight from "./tight.module.css") carries that file's scoped sheet ahead of its own, as postcss-modules prepends the sheets it fetched for composes; oj took the class names and dropped the rules.
  • oj build of a TanStack Start app: the files a chunk sheet's url()s emit are the sheet module's assets, so the chunk's manifest row lists them under assets, as vite:css-post adds them to the chunk's importedAssets; oj recorded them under the url text and listed nothing.
  • oj build with build.minify: false: a stylesheet is emitted as written (or as PostCSS printed it), comments and 0px included, as Vite's PostCSS pass leaves it; oj printed it through lightningcss.
  • oj build: a stylesheet is lowered to the browser targets once, as under Vite. Vite's compile pass is PostCSS's by default and lowers nothing; under css.transformer: "lightningcss" (now read) it lowers every sheet to the baseline browsers; its minify lowers every sheet to build.cssTarget. oj's compile lowered every sheet and the chunk's minify lowered it again, and a lowering adds a vendor-prefixed copy of a declaration beside the one the sheet carries, so a Tailwind sheet's a { -webkit-text-decoration: inherit } came out with one copy fewer than Vite's and a plain sheet's with one more. A ?inline sheet is finished as Vite's finalizeCss finishes it (at-rules hoisted, minified under build.cssMinify).
  • oj build: Tailwind and the other PostCSS plugins run under NODE_ENV=production, as they do in vite build's process; the engine oj runs them in had no NODE_ENV, so Tailwind skipped the optimization it applies in production (its own lowering and minify) and its sheet differed from Vite's.
  • oj build: a generateBundle, writeBundle or renderChunk hook gets rolldown's output options (dir resolved against the root, format, sourcemap, the file name patterns), as under Vite; oj passed the environment's build config, so a plugin writing a file beside the bundle (path.join(options.dir, ...)) threw.
  • oj build: a plain build's output.entryFileNames and output.chunkFileNames may be functions, a codeSplitting group's name may be one, the plugins' outputOptions hooks are applied, and experimental.chunkOptimization (mergeCommonChunks: false) reaches rolldown, as the TanStack Start build already had them: the functions run in the plugin host. oj warned and dropped them, so an app pinning its boot modules into $initial groups saw rolldown's merge pass fold them back into the entry. An output.assetFileNames function still falls back to the default pattern in a plain build (the stylesheets oj writes itself are named without the host).
  • oj build: a plain stylesheet import is an empty module (export {}), as vite:css-post returns one in a build; oj gave it a default export of undefined, which its chunk kept (var main_default = void 0) and which moved esbuild's choice of every minified name in the chunk.
  • oj build: the stylesheet of a chunk with no facade module (a codeSplitting group's) gets its own manifest row, keyed _<sheet file>, as rolldown's manifest writes it; oj listed it under the chunk's css alone.
  • oj build: a small ?url import inlined as a data URL carries mrmime's type for a text file (text/markdown, application/json, text/javascript, text/html, text/csv, text/yaml, application/toml, application/wasm), as Vite's asset plugin writes it; oj wrote application/octet-stream for them.
  • oj build: a dynamic import with a variable (import(./locales/${lang}.json)) is written as Vite's dynamic-import-vars writes it: a call of rolldown's __variableDynamicImportRuntimeHelper over the import.meta.glob of the files the template can name, the template kept as the runtime path and the pattern's segment count passed, the helper module imported alongside; oj wrote a switch of its own over the matching files, so the chunk's text and hash differed from Vite's, and a template matching no file (an empty locales directory) was left as a bare dynamic import for rolldown to warn about. The dev server keeps its own expansion.
  • oj build: a TypeScript or JSX module of a plain build is lowered to JavaScript by oj's vite:oxc slot (the one the TanStack Start build already used) before rolldown parses it, so an enum stays the object Vite emits; oj let rolldown's own TypeScript transform run, which has enum inlining fixed on, so an enum's members were inlined as their values and the enum dropped from the chunk.
  • oj build: import.meta.glob in a plain build expands to Vite's transformGlobImport text (/* #__PURE__ */ Object.assign({...}), the eager bindings), as the TanStack Start build's already did; the plain build used an older expander whose object differed, and so did the chunk's bytes.
  • oj build source maps: an asset module (?url, ?inline, a plain asset import, a public/ file) carries no map of its own, as Vite's asset plugin returns none, and Vite's modulepreload polyfill and preload helper modules come with an empty one, so a chunk's map names the app's code and not the helpers'; an import() the import analysis wrapped maps to nothing past the call, as under Vite; an asset module's code has no trailing semicolon (the text shows in sourcesContent); and the map of a chunk the import analysis rewrote is written as Vite's JS side writes a remapped one, names holding only the names its mappings reference.
  • oj build of a TanStack Start app: the server-function manifest covers every module Start's compiler takes (.js, .jsx, .mjs, .cjs, .mts, .cts as well as .ts and .tsx); a server function in a .jsx module failed at runtime with "Server function info not found".
  • oj build of a TanStack Start app: an emitted asset's name goes through rolldown's sanitizeFileName set, so @ ( ) ~ ! ' and a space in a file name stay as Vite keeps them; oj replaced them with _.
  • oj build: a chunk group's tags reach rolldown (output.codeSplitting.groups[].tags, ["$initial"]: only the modules the entries reach by static imports). oj read a group's name, test, sizes and share counts and dropped its tags, so a group written with tags and no test, as an app pinning its boot path writes one ({ name: "app-boot", tags: ["$initial"], minShareCount: 1 }), captured every module of the bundle, the lazy ones included: on one large TanStack Start app the client's app-boot chunk was 61 MB where vite build writes 462 KB, and every route's first load fetched it. The tags are forwarded in the Start client bundle and in the plain build's advancedChunks alike.
  • oj build of a TanStack Start app: the client's chunks are written where the app says, as under vite build. The client environment's output.chunkFileNames and output.entryFileNames (build.rolldownOptions.output, a pattern or a function of the chunk) are honored, and so are the plugins' outputOptions hooks, each taking the options the last one returned over Vite's <assetsDir>/[name]-[hash].js: a plugin wrapping chunkFileNames to give some chunks a directory of their own (assets/i18n-data/<group>.<locale>-[hash].js for per-locale message modules) now places them there. oj wrote every client chunk as assets/[name]-[hash].js and ran no outputOptions hook, so such chunks landed flat in assets/ under their bare names, where a preload manifest or import map built from the configured layout did not find them. A function is called in the plugin host with the chunk as Rollup's PreRenderedChunk (name, isEntry, isDynamicEntry, facadeModuleId, moduleIds, exports). The server bundle's names and assetFileNames are unchanged.
  • oj build: Vite's .vite/manifest.json is written for a TanStack Start app's client, and a chunk is keyed in it as Vite keys it. With build.manifest on the client environment (environments.client.build.manifest, or the top-level option), vite build writes the manifest into dist/client, and a script reading a route's chunk closure from it (imports for what the page loads, dynamicImports for the rest) found no file under oj: the Start build never wrote one. It is written now, from the plugin host's resolved config, with a row per chunk and per stylesheet (keyed by its source, and listed under css by the chunks holding its module). In every build's manifest a chunk with a facade module is keyed by that module's path relative to the root and carries it as src, a dynamic entry as well as an entry (Vite's getChunkOriginalFileName: src/routes/a.tsx?tsr-split=component, ../store/node_modules/dep/index.mjs for a source outside the root, a virtual id without its NUL); oj keyed only entries so and gave every other chunk _<file name>, so a lookup by source path missed every lazily imported module. Not in the Start manifest yet: rows for images and fonts, and the entry's key is oj's own client entry module.
  • oj build of a TanStack Start app: the chunks a plugin's generateBundle and writeBundle see carry Vite's viteMetadata, and build.cssCodeSplit: false builds again. Vite's css plugin records on every chunk the stylesheets it imported (viteMetadata.importedCss, a Set of file names, beside importedAssets); oj set neither, so a plugin collecting a chunk's stylesheets ([...(output.viteMetadata?.importedCss ?? [])], for the entry closure's Link preload hints) found none, and one reading it as the type allows threw. A client chunk now names the sheets oj wrote for the modules it holds, as Sets, and the client's .vite/manifest.json and the one a plugin sees in the bundle list them under css. Start's own manifest plugin reads them too, so a route gets the stylesheets of its chunks from it; the root route still links every sheet, in the order oj linked them, and a sheet the root links is dropped from the other routes, so a page links what it linked before, once. With build.cssCodeSplit: false, Start's manifest plugin (hosted in a build since the manifest became Start's own) looked for the single style.css Vite writes and failed the build with could not find Vite's generated style.css manifest entry: a Start build writes a sheet per source and links them itself whatever the option says, so the environment's config now reads cssCodeSplit: true there, as the build behaves. importedAssets is empty, and a server chunk has no viteMetadata yet.
  • oj build of a TanStack Start app on @cloudflare/vite-plugin writes the Worker to dist/server, where vite build puts it; it went to a directory named after the Worker's environment (dist/ssr). Start's config hook declares the output directories (<build.outDir>/client and <build.outDir>/server, or the ones the config sets for the environments) before the Cloudflare plugin reads them, and oj runs without that hook, so the plugin fell back to its own default. oj now declares the same directories ahead of the plugins' config hooks: the Worker, its wrangler.json, the .wrangler/deploy/config.json redirect and the resolved config the plugins read all name dist/server. A deploy step or script that read dist/ssr from an oj build needs the new path.
  • Plugin host: a build whose plugin hooks run by the thousand at once (a TanStack Start app with route-group plugins walking the module graph) no longer dies with the host out of memory or declared unresponsive. Each waiting hook call used to probe the host on its own every 20 s, and each probe serialized every hook in flight, so the load grew with the square of the calls in flight; the probe is now shared across the waiting calls (one every 10 s), answers with a count and the eight oldest calls, and the engine's scheduler polls its parked calls through a FuturesUnordered instead of walking every one on each tick. When the host does stop scheduling, oj prints the JS stack it was on (a V8 interrupt) with the error.
  • oj build of a TanStack Start app: a client chunk reads process.env as vite build writes it. Vite's define plugin makes process.env an empty object with NODE_ENV its one key (under global and globalThis too) and Start's plugin defines process.env.TSS_SERVER_FN_BASE and import.meta.env.TSS_SERVER_FN_BASE; oj defined process.env as an object carrying both and aliased global, and opened every client chunk with a globalThis.process = … banner that Vite's output has not (4,700 of Lovable's 13,900 client chunks differed by that line alone).
  • oj build of a TanStack Start app on @cloudflare/vite-plugin: the Worker environment's .vite/manifest.json is written (the plugin turns build.manifest on for the entry Worker), as the client's is. The Worker keeps the entry shape rolldown gives the plugin's preserveEntrySignatures: "strict": with the rolldown oj bundles with (1.3, Vite 8.4's) index.js is a facade re-exporting assets/worker-entry-<hash>.js, as vite build writes it there (Vite 8.2's rolldown 1.2 wrote the chunk itself as index.js).
  • oj build: public/ is copied into the client output before the bundle writes, as Vite's prepareOutDir does, so a file the bundle emits under the same name replaces the copy; it was copied after, so @cloudflare/vite-plugin's .assetsignore (the public one plus wrangler.json and .dev.vars) lost to the public copy.
  • oj no longer sets VITE_CONFIG_NATIVE_IGNORE_WARNING in the environment the app's config runs in: a config that gathers the whole environment (loadEnv(mode, root, "")) into a Cloudflare Worker's vars wrote it into dist/server/wrangler.json. Vite's native-loader warning is dropped at the config loader's logger instead.
  • oj build: a ?worker bundle's chunk is named after the worker's file (inspectZip.worker-<hash>.js), as Vite names it; oj named every one worker-<hash>.js.
  • oj build of a TanStack Start app: build.minify: "esbuild" minifies each chunk with esbuild's transform in renderChunk, after every other plugin's, as Vite's vite:esbuild-transpile does, rolldown's own minifier off; oj minified with rolldown's regardless of the name. The bundles' comments follow Vite's output options (none survive a minified build; oj kept /* @__PURE__ */ annotations) and run with rolldown's experimental.viteMode, as every Vite environment does. The manifest wrapper oj writes for the server is named _tanstack-start-manifest_v, its chunk the name Vite's virtual manifest module gets.
  • oj build of a TanStack Start app: the client bundle enters at the app's own Start client entry (src/client.tsx by convention, or tanstackStart({ client: { entry } })), as Vite's does through virtual:tanstack-start-client-entry, and its chunk is index-<hash>.js after Start's input name, keyed in the manifest by the app's file. oj entered at its own stub, named client-<hash>.js, so an app's polyfills and boot-time setup were missing from the build.
  • Plugin host: the resolved config's build defaults are Vite 8's (target the baseline browsers, minify: "oxc"), and a default is replaced by the app's value rather than joined with it; a stale target: "modules" default joined the app's target list and esbuild rejected --target=modules,....
  • oj build of a TanStack Start app: the client's stylesheets are code-split as vite build splits them. A chunk gets one sheet named after it (assets/<chunk>-<hash>.css, the entry's index-<hash>.css, under output.assetFileNames), holding its CSS modules' sheets in module order, as Vite's css-post writes in renderChunk; a chunk holding nothing but plain CSS (a sheet two lazy routes share) is dropped from the bundle and its importers take its sheet, as Vite drops a pure CSS chunk; the page links the entry chunk's closure of sheets alone, a route's own coming from its chunks through Start's manifest; and every dynamic import() is wrapped in Vite's preload helper (__vitePreload, the chunk's __vite__mapDeps table naming the lazy chunk, what it imports and their sheets), as vite:build-import-analysis writes it. oj wrote one sheet per CSS module, linked them all on the root route, and wrapped no import (4,700 of Lovable's client chunks differed by that alone, and a lazy route loaded with none of its CSS preloaded).
  • oj build of a TanStack Start app on @cloudflare/vite-plugin: the Worker environment's build.emitAssets (the plugin turns it on) is honoured as Vite honours it: the Worker's chunks write their stylesheets (one per chunk, named after it, pure CSS chunks dropped) and the files those sheets reference under dist/server/assets, minified under ssr's cssMinify, and the Worker's .vite/manifest.json lists them; a Node server build still writes none (ssrEmitAssets off). oj compiled the server's sheets for their class names only, so dist/server/assets lacked the 37 stylesheets and the fonts vite build writes there.
  • oj build of a TanStack Start app: every bundle declares its top-level bindings with var, as Vite's topLevelVar: true output option has rolldown do; oj's chunks kept const/let, so a chunk's bytes differed from Vite's in every declaration.
  • oj build of a TanStack Start app: a stylesheet imported with ?url is compiled as Vite's css plugin compiles every sheet, its @imports inlined (postcss-import) and their urls rewritten to the emitted assets. oj emitted a plain .css ?url sheet as written, so a fonts sheet importing a package's @font-face rules (@import "@fontsource-variable/roboto-mono/index.css") shipped the bare @import, which 404s from assets/, and the six font files it names were never emitted.
  • oj build: a ?worker bundle is minified as Vite's bundleWorkerEntry minifies it. Vite hands rolldown no minify for the worker (its default, 'dce-only') and, under build.minify: "esbuild", vite:esbuild-transpile mangles and compresses the chunk in renderChunk before rolldown's DCE pass prints it again with its own whitespace; oj ran rolldown's full minifier on the worker, so Lovable's worker chunks came out 20% to 30% smaller than Vite's. Under "oxc" and false nothing changes.
  • oj build of a TanStack Start app: the preload helper module (\0vite/preload-helper.js) is the one the app's own Vite composes, read off its vite:build-import-analysis plugin, so a chunk carries the helper of the Vite the app runs, a patched Vite's included (Lovable patches __vitePreload to touch only unseen deps); oj wrote its own copy, taken from a later Vite than the app's.
  • oj build of a TanStack Start app: the StyleX plugin's cssInjectionTarget picks the stylesheet the rules join, as @stylexjs/unplugin's generateBundle asks it; oj took the plugin's default pick (the first index-*.css, else style-*.css, else the first sheet by name), so an app sending its rules to globals-*.css found 300 KB of them appended to a lazy route's sheet that happened to sort first.
  • oj build of a TanStack Start app: a classic (iife) worker bundle's import.meta is rewritten as Vite's worker plugin rewrites it, module by module after the URL plugins ran: an import.meta.url read is self.location.href, any other import.meta is _vite_importMeta, a var _vite_importMeta = { url: self.location.href } put first in the module (so a library's import.meta.url = ... guard assigns to that object, as under Vite, whose native plugin rewrites the read member expressions and visits an assignment target's import.meta on its own). oj had a define write self.location.href and an inline object into every use instead, and the worker chunk differed from Vite's.
  • oj build of a TanStack Start app: a new URL(file, import.meta.url) of a worker or an asset is written with the file's built URL as a string (new URL("/assets/x-<hash>.js", '' + import.meta.url)), as Vite's worker and asset import-meta-url plugins leave it once renderChunk fills their placeholder in; oj imported the URL from the file's ?worker&url or ?url module, so the chunk declared a variable for it, which the minifier keeps, and every chunk spawning a worker that way differed from Vite's. A stylesheet keeps its import, compiled through the plugins as a ?url sheet is.
  • oj build of a TanStack Start app: the vite:oxc slot takes the modules Vite's native transform takes, by the environment's resolved oxc.include/oxc.exclude and, as rolldown's plugin does, any module its Fast Refresh include names (@vitejs/plugin-react names every .js, .jsx, .ts and .tsx module), oxc: false turning it off. With the default filter alone oj left .js modules as loaded, so Lovable's compiled i18n messages and runtime kept their comments and measured a fifth larger than under Vite, which moves a codeSplitting group's cut.
  • oj build of a TanStack Start app: the implementation that takes a createIsomorphicFn(), createServerOnlyFn() or createClientOnlyFn() call's place (and the no-op or throwing stub for the other side) is written with parentheses only where its position needs them, as TanStack's compiler prints it: a callee, a member expression's object, a template's tag, a conditional's test, an operand, an expression statement. oj wrapped every one (const f = (() => ...)), which the chunk's minifier keeps, so every such module differed from Vite's by two bytes a call, and Lovable's app-shared chunk, which holds Start's own stubs, by its hash.
  • oj build of a TanStack Start app: the import() of a dropped pure CSS chunk becomes Promise.resolve({}) as Vite's renderChunk writes it, with no padding to the import's length (that is its generateBundle fallback, for an import its renderChunk did not rewrite); oj padded every one, so a chunk importing such a sheet was a dozen bytes longer than Vite's and its hash another.
  • oj build of a TanStack Start app: a ?worker bundle is written without rolldown's topLevelVar, as Vite's bundleWorkerEntry writes it (the page bundles keep it), so a worker's top-level const reaches the host's vite:esbuild-transpile as written and a literal constant is inlined where Vite inlines it; oj turned it into a var first, which esbuild leaves alone (a worklet's const BATCH = 1024 stayed a variable).
  • oj build of a TanStack Start app: the throwing module for an optional peer dependency nothing resolves is the one rolldown's native vite:resolve loads in a build (export default {} and the throw; the question "Is it installed?" in production only), an ES module the importing chunk wraps as Vite's does (__esm, a default export). oj wrote the JS resolve plugin's CommonJS version (module.exports = {}), so framer-motion's vendor chunk wrapped it with __commonJS and differed from Vite's by its runtime helpers and every name after.
  • oj build of a TanStack Start app: a chunk's import "./x.js"; of a pure CSS chunk the bundle dropped leaves a /* empty css ... */ comment the statement's length in its place, as Vite's css-post does (getEmptyChunkReplacer), so what follows keeps its position under the chunk's sourcemap; oj cut the statement out, and every such chunk was a few dozen bytes short of Vite's.
  • oj build of a TanStack Start app: every TypeScript and JSX module is lowered where Vite's vite:oxc lowers it, between the "pre" plugins and the normal ones, and printed as a build's rolldown prints it (builtin:vite-transform: oxc's codegen with the ordinary comments dropped and the JSDoc kept), so the text rolldown parses is Vite's. oj lowered inside rolldown, which keeps the text it loaded, so a module counted as its TypeScript source, comments and types included, where Vite counts the printed JavaScript; rolldown splits an oversized codeSplitting group by those sizes, and Lovable's editor groups split into 48 and 12 chunks where Vite's make 45 and 10, with every hash downstream moved (some 2,700 client chunks differed by nothing but the hashes they named). The normal and post plugins' filter.code reads the lowered module, as under Vite.
  • oj build: a TypeScript module the plugin host lowered for a normal or post plugin (Vite's vite:oxc slot, run with the app's own transformWithOxc) reaches rolldown as JavaScript, as vite:oxc returns it (moduleType: "js"). oj left the module type to its .tsx id, so rolldown's own TypeScript transform ran over the lowered code once more and dropped the imports the lowered JSX no longer referred to: import React from "react" in a component under the automatic runtime, which vite build keeps for the module's side effects (__toESM(require_react(), 1)). On one TanStack Start app, over a hundred chunks were a few dozen bytes shorter than Vite's for it.
  • oj build of a TanStack Start app: the server's _tanstack-start-manifest_v-<hash>.js chunk gets no sourcemap, as under vite build: rolldown maps no virtual module, and Start's manifest module is one (\0tanstack-start-manifest:v). oj's wrapper around it (the module adding the client's stylesheets to the root route) was a file in .oj-cache, so the chunk came with a .map Vite's server output has no counterpart for. The wrapper is now a virtual module too, named so the chunk keeps its name.
  • oj build of a TanStack Start app: a plugin an app makes of @stylexjs/unplugin's (spreading its hooks under a name of its own and routing transform and generateBundle through them, as Lovable's two-instance split build does, Pulse's rules under one class prefix and layer, the app's under another) runs as under Vite. oj's stand-in for the package carried only the options, so such an app found no transform on it and fell back to one unsplit instance: every module compiled under one prefix, the sheet's layers differed, and the chunk cuts followed the module sizes. In a Start build the stand-in now composes the package's own plugin, every hook over its shared rule store, with oj's compiler as the transform (through the plugin host, each module's rules written into the store as the real transform writes them); an instance a config lists as it is keeps oj's native path. The plugin's generateBundle sees the client's stylesheets as Vite's css-post emits them, appends its rules to the one it picks and re-emits the sheet under rolldown's hash of the new text; the old file goes, and the chunk importing it ?url, both manifests and the server bundle name the new one.
  • oj build of a TanStack Start app: an asset under build.assetsInlineLimit (4 kB) imported by a module or named by a stylesheet's url() is inlined as its data URL, as Vite's build inlines it (an svg URL-encoded, anything else base64; never with ?no-inline, an .html, an svg with a fragment or a Git LFS pointer); oj emitted every such file, so small icons and a 3.6 kB KaTeX font were files where vite build has data URLs.
  • oj build: a read of import.meta.env.VITE_X the build has no value for is undefined, as Vite's define makes it in a bundled environment (import.meta.env.*), so a branch on it is dead and the import() behind it with it; oj left the read on the env object, so a dev-only recorder's chunk shipped and was preloaded.
  • oj build of a TanStack Start app: a module a plugin resolves by passing its this.resolve answer on keeps the package.json that answer names, as under rolldown, so its format stays what "type": "module" makes it and its CommonJS imports take the node-mode interop (__toESM(require_x(), 1)); oj's host dropped the package.json from such answers and from its own resolver's, so every module resolved that way lost the flag, one byte off Vite's in every chunk importing it.
  • oj build: a chunk's sourcemap names the app's code only. Vite's asset, worker and CSS plugins hand rolldown an empty map ({ mappings: "" }) for the module they produce, and rolldown then lists no source for it; oj's loaders returned no map, so every stylesheet, ?raw text, ?url and worker module travelled in sources and sourcesContent (Lovable: 3296 maps differing from Vite's). In the plain and the TanStack Start build alike.
  • oj build: output.codeSplitting with groups (rolldown's current name; Vite 8 documents it) reaches rolldown in the plain build, as advancedChunks did; the groups were silently unapplied, so an app's vendor-react chunk never formed.
  • oj build of a TanStack Start app: a module a package's sideEffects glob covers is still dropped when it is pure and imported for nothing, as vite build drops it. Vite's resolver answers every resolution with the package's verdict as moduleSideEffects, which rolldown takes as "analyze the module" rather than as a side effect; oj's answers carried none, rolldown read the field itself and kept the module, and the importing chunk kept an import "./other-chunk.js" for it (Lovable's StyleX token files under **/*.stylex.ts).
  • CSS: a sheet with any Tailwind v4 directive (@reference, @theme, @utility, @source, @variant, @custom-variant, @config, besides @tailwind, @apply, @plugin) compiles through the app's Tailwind, as every sheet does under Vite's PostCSS; a sheet with a @reference alone was emitted as written, with lightningcss warning about the unknown at-rule.
  • oj build of a TanStack Start app: a plain stylesheet imported with import() leaves no JS chunk behind, as under vite build: its module is empty (vite:css-post's code = ""), the chunk holding it alone is a pure CSS chunk that generateBundle drops with its sourcemap, the import() becomes Promise.resolve({}) and the preload list names the sheet alone; the manifest drops the chunk from dynamicImports and keys the sheet by its module. oj's module exported an object, so the chunk stayed and was fetched for nothing (Lovable's katex.min and x-theme sheets).
  • oj build of a TanStack Start app: a chunk's stylesheet takes each sheet once. vite:css-post reads a chunk's sheet off each module's own id, and a ?url, ?inline or ?raw module of a sheet carries none (the ?transform-only one its compile runs under is passed over); oj keyed the sheets by path, so a chunk holding x.css?url and x.css?transform-only took the sheet of x.css twice (Lovable's app-boot sheet carried Partners.css three times over, and its manifest row named another chunk's sheet).
  • oj build of a TanStack Start app: a stylesheet of several modules is joined as Vite joins it, the chunk's sheet minified whole; oj minified each module's sheet on its own and kept esbuild's trailing newline between them, one byte and one hash off per module (six of Lovable's sheets).
  • oj build of a TanStack Start app: Node builtins a browser bundle imports are one stub module under Vite's id, __vite-browser-external (module.exports = {}), as vite:resolve answers every builtin: the chunk that forms when several chunks import it carries that name, and each importer links one stub rather than one per builtin. The working stand-ins (async_hooks, stream, punycode) and dev's warning Proxy stay one module per builtin.
  • oj build and oj dev of a TanStack Start app: a server function's id is the one Start's compiler gives it in a build, the hex sha256 of "<app-relative path>--<name>_createServerFn_handler" (@tanstack/start-plugin-core 1.16x, without a serverFns.generateFunctionId); oj kept the earlier base64url of "<path>#<name>", so a client built by one tool could not call a server built by the other.
  • oj build of a TanStack Start app: a server function's module is built in two, as Start's compiler builds it. The module itself calls its functions through createSsrRpc(id) stubs, and the provider (<file>?tss-serverfn-split) holds the handlers, exported under their <name>_createServerFn_handler names alone with the module's own exports made local; the server-fn resolver imports the provider, a chunk of its own that loads when a function is first called. oj kept every handler in its module and the resolver imported the module whole, one chunk where vite build writes two (Lovable's server bundle: 38 chunks).
  • oj build of a TanStack Start app: an import a package's browser field maps to false (node-forge's crypto) is Vite's browser-external stub, the one __vite-browser-external module every stubbed builtin shares; rolldown's own answer was an empty module named for the package's directory, one per package.
  • oj build of a TanStack Start app: the server-fn resolver is served under Start's own virtual id (\0%23tanstack-start-server-fn-resolver), so its chunk is named __23tanstack-start-server-fn-resolver-<hash>.js as under vite build and carries no sourcemap; it was a cache file whose chunk was named server-fn-resolver.build.
  • oj build of a TanStack Start app: an import rolldown's own resolver answers (no plugin claimed it) gets Vite's side-effects verdict from the package's sideEffects field as moduleSideEffects, as every resolution does under Vite's resolver; rolldown read the field as the verdict itself and kept a pure module a glob covers, with an import "./conditions.stylex-*.js" in every chunk of Lovable's server bundle that named it (64).
  • oj build of a TanStack Start app: a server function's provider module (?tss-serverfn-split) carries the handlers alone, as Start's compiler leaves it: with the module's exports made local, what nothing reads goes (the route and its component, the imports only they used); oj kept them, so a provider chunk carried the route's page and its dependencies' chunks with it.
  • oj build of a TanStack Start app: a bare import nothing resolves, from a package listing it as an optional peer dependency (framer-motion's @emotion/is-prop-valid), is Vite's __vite-optional-peer-dep:<import>:<package> module, which throws when it runs; rolldown left a require() of it to its runtime's require shim, a helper Vite's bundle never carries (and every chunk's import of the runtime renamed around it).
  • oj build of a TanStack Start app: the manifest lists the assets a chunk's modules import (?url and new URL assets, workers, a stylesheet's url() files) on the chunk's assets, the chunks a plugin's generateBundle sees carry them as viteMetadata.importedAssets, and every written asset has a row keyed by its source, as Vite's manifest has; oj writes these files itself, outside rolldown's bundle, so they were missing (Lovable: 173 rows and 16 chunks' assets).
  • oj build of a TanStack Start app: a chunk's stylesheet with the bytes of an asset emitted already takes that asset's name, as under vite build: rolldown's file emitter keeps one asset per source for the files emitted without a fileName (a ?url sheet, a chunk's sheet, a CSS url() file), the shortest name winning while it builds and the first once output starts (css-post emits a chunk's sheet in renderChunk). oj wrote the chunk's sheet under the chunk's name beside the ?url asset of the same text, so Lovable shipped Partners-<hash>.css and PartnersProgramSteps-<hash>.css (one file twice) and every chunk naming the sheet hashed the second name. A ?url or url() asset with another's bytes names it too when its own name is no shorter.
  • oj build and oj dev: a CSS module's class map is the JS Vite's css-post writes, dataToEsm(map, { namedExports: true, preferConst: true }) text for text: each legal identifier a const named export the default map refers to (dialog: dialog), a key that is an identifier name but no legal identifier (class, Map) exported through an _arbitraryN const, the rest quoted in the default map alone, tab-indented. oj repeated every string in the default map, so a chunk holding a CSS module minified to different text (H={dialog:"…"} for Vite's H="…",W={dialog:H}).
  • oj build and oj dev: an import.meta.glob call is replaced with the text Vite's transformGlobImport writes: /* #__PURE__ */ Object.assign({"k": () => import("s"),…}) (a bare object under Object.keys(…), an array under Object.values(…)), a named import through .then(m => m["name"]), an eager entry a __vite_glob_<call>_<file> binding declared by import { name as … } or import * as … statements prepended with no newline. oj wrote a plain object with its own binding names and spacing, so the chunk's text differed (pt={…} for pt=Object.assign({…})) and rolldown sized the module differently when it split chunks.
  • oj build of a TanStack Start app: the client's .vite/manifest.json is laid out as Vite 8.4 lays it out. rolldown's native vite-manifest plugin keeps the rows in a BTreeMap, so they come sorted by key; css-post emits a ?url sheet under cleanUrl(id), its absolute path, so the sheet's row is keyed by that path (an image or font keeps its root-relative key); Vite's worker cache then adds a _worker_<file> row per worker bundle (the entry's source and file, the sheets and assets its modules emitted, isWorkerEntry, its name, isDynamicEntry, isWorker), the worker's own assets having no row of their own; and the chunk naming a worker with new URL(..., import.meta.url) lists the worker's file among its assets. The sheet of a chunk with no facade module keeps a row keyed _<file> (css-post names it so, and no JS chunk takes that key), a sheet a hook re-emitted is keyed _<file> in a Worker bundle's manifest too (the hook emits it without an original file name), and the Start manifest wrapper's chunk is keyed by Vite's virtual module, tanstack-start-manifest:v. A Cloudflare Worker's manifest lists the worker bundles its own modules reference, as Vite's shared worker cache lists each environment's live ones. oj wrote the rows in bundle order, keyed the sheets relatively, gave a worker's assets rows and the worker none, and listed nothing on the chunk.
  • oj build of a TanStack Start app: rolldown's transform.target is build.target (the baseline browsers by default), as Vite's buildEnvironment passes it, so the lowering and rolldown's own passes read the same target as under Vite: a new RegExp of a lookbehind folds to a literal only where the target supports it, and marked's !!new RegExp("(?<=1)(?<!1)") is true in the chunk as under Vite (oj passed no target, and Lovable's vendor-document-editor chunk kept the call).
  • oj build of a TanStack Start app on @cloudflare/vite-plugin: the Worker bundle's ?url copy of a stylesheet a generateBundle hook re-emitted (StyleX appending its rules) carries no /*$vite$:1*/ hash marker. The hook appended to a source carrying the marker, css-post strips it from what is written, and oj's client copy was clean while the server's kept the marker in the middle of the sheet.
  • oj build: every wrapped import() gets a preload marker of its own, __VITE_PRELOAD__ and the xxhash of <module stable id>_<index> (32 hex digits), as rolldown's vite-build-import-analysis writes it. Vite replaces the markers after esbuild's minify, and esbuild's name alphabet reads the chunk's character frequencies, digits included, so a chunk's import aliases came out differently under oj's one bare marker (four Lovable chunks differed by nothing else).
  • oj build of a TanStack Start app: a module importing StyleX leaves the plugin as babel prints it, as under vite build: @stylexjs/unplugin runs babel.transformAsync over every such module, compiled or not, and @babel/generator writes an expression's parentheses only where the grammar needs them, so a source's cond ? ((...a) => x) : y reaches vite:oxc without the arrow's. oj's compiler spliced the source and kept them, oxc's parser marks a parenthesized function (pife), and every print after it kept them, through esbuild's minify into the chunk (Lovable's drawer). The module is reprinted after the compiler with those marks cleared, its map composed with the compiler's; oj dev keeps the splice.
  • oj build: rollupOptions.output.minify is read as rolldown reads a minify object: mangle and compress each a boolean or their own options (toplevel, keepNames, reserved; target, dropConsole, dropDebugger, joinVars, sequences, unused, keepNames, dropLabels, maxIterations), codegen a boolean or { removeWhitespace, asciiOnly }, and 'dce-only' rolldown's dead-code pass; oj read each key as on or off. Under build.minify: "esbuild" the option still overrides the false Vite hands rolldown, as it does under any minifier. compress.treeshake and mangleProps are not supported and warn.
  • oj build --ssr: the wasm helper a ?init module imports reads the file beside the chunk (readFile(new URL(url, import.meta.url))), as Vite's helper does in a server bundle; oj wrote the browser's fetch there.
  • oj build: a RegExp in the config keeps its flags on the way to rolldown (external, output.sourcemapIgnoreList, a chunk group's test, css.modules.globalModulePaths, ssr.noExternal), so /^@scope\//i matches as it does under Vite; oj kept the source alone.
  • oj build: build.target: false hands rolldown no target, as Vite does, so nothing is lowered (build.cssTarget inherits it); oj refused the value. rollupOptions.output.dir is the output directory when set, over build.outDir, as Vite resolves it.
  • oj build --ssr: the server entry's extension follows the nearest package.json above the root (type: "module" gives .js, else .mjs), as Vite's findNearestPackageData reads it; oj read the root's file alone.
  • oj build and oj dev: a mode named local is refused with Vite's message (it conflicts with the .env.local files), and an env file's NODE_ENV is read as written before expansion, as Vite reads it into VITE_USER_NODE_ENV.
  • oj build: an HTML <script src> marked vite-ignore keeps its URL under a base, a whitespace-only <style> is minified like any, a public file's URL already equal to the attribute stays as text, and an .html or an .svg#fragment file imported with ?url is never inlined, as Vite's shouldInline has it; a base of .x is refused with Vite's warning and / taken. A page whose module scripts are all async gets the async preload polyfill; one with any module script gets the polyfill at all.
  • oj build --ssr: the server bundle honours output.format, preserveEntrySignatures (Vite's allow-extension), entryFileNames/chunkFileNames/assetFileNames, inlineDynamicImports (and a webworker target, which Vite inlines too), banner/footer/intro/outro, globals, paths, name, extend, exports, hashCharacters, externalLiveBindings, keepNames, minify and comments, and the environment's own build.minify over the top-level one; a pure stylesheet chunk dropped from the server bundle hands its assets to its importer as the client's does.
  • oj build --emptyOutDir takes no value (--emptyOutDir false turns it off), and --mode reaches the config hooks as the inline mode, as Vite's CLI passes both.
  • oj build: a generateBundle hook reading a binary asset's source (an image a plugin emitted) gets its bytes as a Uint8Array, as Vite hands them; oj decoded them as text.
  • Plugin host: a resolveId answer carries a package's facts (its sideEffects, its root) only for a bare import, as Vite's resolver attaches them; the esbuild minify pass runs when any environment's build.minify is "esbuild", not only the top level's, read from the config the plugins' apply sees (the host's own resolved config is only Vite's defaults when the plugins are listed, so a config naming esbuild got no pass in a host started without its build block); its renderChunk returns an empty map when source maps are off; the server environment's build.emitAssets falls back from ssrEmitAssets through the environment's and the top-level build blocks to false, as Vite resolves it; a server entry is named [name].<js|mjs> by the package's type and its assets [name]-[hash].[ext], as Vite's output defaults have them; and a dev-server plan is not pinned open by a plugin's generateBundle, renderChunk or writeBundle (only buildEnd runs there), so Start's import protection no longer keeps every transform on in oj dev.
  • build.minify: "terser" is taken as "oxc" (oj ships no terser); it failed the config.
  • oj build: .vite/ssr-manifest.json is written as Vite's ssr-manifest plugin writes it: every module id keyed by its path relative to the root (a virtual \u0000vite/... id as written, a module above the root as ../x.js), keys sorted, the dynamic-import deps map ("lazy-HASH.js": [css]) only where the rendered chunk still holds the literal __vitePreload (under the default minifier it is mangled, so only minify: false keeps it), entry chunks listing nothing under cssCodeSplit: false, and the page's HTML assets on its entry chunk's modules, the manifest written after the pages. oj dropped the virtual keys, kept insertion order, always wrote the deps map and wrote the manifest before the pages were rendered.
  • oj build: the html-proxy index of an inline <script type="module"> counts every module script (a src one included), every style="" attribute with a url and every <style> before it in document order, as Vite's inlineModuleIndex does (the id lands in source maps and the ssr manifest); a type="MODULE" script is a classic script left in place with Vite's can't be bundled without type="module" attribute warning (Vite compares the exact lowercase value); a whitespace-only inline module script is removed and bundled as an empty module; an HTML asset reference keeps its whole ?query#fragment on the emitted URL (/assets/big-HASH.png?v=2#frag), dropped only for a data URL; an asset a page references gets its manifest row even when the page's entry chunk is inlined; a <link rel="stylesheet"> href is resolved through the aliases, tsconfig paths and packages before it is bundled, left with Vite's warning when nothing resolves; an <img src> naming an input key is left alone (Vite's namedOutput); an <script type="importmap"> after a module script and mixed async/defer module scripts print Vite's warnings.
  • oj build: public/ is copied for a library build and an SSR build too (Vite copies it into every environment's output directory), before the bundle is written and overwriting what was there (the bundle then wins over a same-named copy), with Vite's warning when publicDir and outDir are not separate folders; oj copied only in the app build, after the bundle, and never over an existing file.
  • oj build --ssr: the entry's extension follows output.format as Vite's resolveOutputJsExtension does (a CommonJS package: .mjs for es, .js otherwise; a "type": "module" package: .cjs for cjs/umd, .js otherwise), the chunks' too; build.ssr: true builds every input of rollupOptions.input (else the top-level input), not the first; the server bundle writes its stylesheets and emitted assets when the ssr environment's build.emitAssets is on (build.ssrEmitAssets, the environment's own or the top-level build.emitAssets), and removes rolldown's other asset files when it is off, as vite:asset does.
  • oj build: the command line's strings reach the config as cac leaves them: --manifest false names a manifest file false (Vite writes dist/false), the same for --ssrManifest, and --ssr false is an entry named false; only --sourcemap, --minify and --emptyOutDir are read as booleans; --ssr with no value is build.ssr: true. build.minify: "terser" prints a (!) warning that oj minifies with oxc. With both build.lib and build.ssr set the library is built, as Vite picks its input. The build log is Vite 8's reporter: ✓ N modules transformed., assets then CSS then JS each ascending by size, dist/ prefixed names, sizes in kB over 1000 with two decimals, a gzip column for compressible files, a map column under sourcemap: true or hidden, ✓ built in Xms, and rolldown's codeSplitting hint for a large chunk.
  • oj build (workers): a classic (iife) worker's import.meta.env.* reads and import.meta.ROLLUP_FILE_URL_* asset references were rewritten to a _vite_importMeta object and came out undefined at runtime; the rewrite now mirrors rolldown's web-worker post plugin exactly (import.meta.url → self.location.href, any other member left alone, a bare import.meta → the object). A worker bundle runs the vite:oxc slot (rolldown's own TypeScript transform inlined enums), runs under rolldown's Vite mode, takes worker.rolldownOptions (its external, its output file-name patterns over the assetsDir defaults), finalizes a .css?url sheet as the app's bundle does, emits a file the app's bundle already holds with the same bytes once (Vite's isSameContent), and is not written when its ?worker import was tree-shaken. A ?worker&inline bundle emits its assets and maps, keeps the entry's sourceMappingURL comment, and takes preserveEntrySignatures: false (its exports leaked into the wrapper). Under build.sourcemap: "inline" no extra .map is written for a worker. Under a relative base an iife worker resolves its assets from self.location.href, as Vite's worker-iife mechanism does. A new Worker(new URL(...), opts) whose options are not static (or spread after type, or with a non-literal type) fails with Vite's message.
  • oj build: under a relative base (./ or empty) a public file's URL, a ?url sheet's URL and the url()s of a ?inline sheet are spliced into their string literals in Vite's form ("" + new URL("x", import.meta.url).href + ""); oj wrote the bare expression, and an ?inline sheet's url() a path relative to the sheet (wrong against the document). A /public/x.png?inline over assetsInlineLimit is emitted hashed into assets/ with its originalFileName, as Vite's shouldInline runs on the bare path; build.assetsInlineLimit as a function is called per file through the plugin host; the inline decision follows Vite's order (?no-inline, ?inline, a library, an entry, .html, an svg with a fragment, the limit); *.module.css?url is Vite's error; new URL("./x.png?url", import.meta.url) keeps ?url in its postfix; a ?init WebAssembly asset carries its originalFileName (the manifest row src/x.wasm) and resolves as a file URL in a server bundle; a direct .wasm import, .wasm?source and the import source phase are Vite 8.4's WebAssembly ESM integration (the module's imports and exports read from the binary, Vite's glue text); a backslash in an inlined SVG stays as Vite leaves it; an ?inline sheet's url() assets get their manifest rows and the chunk's assets entries.
  • oj build of a TanStack Start app: a .env with NODE_ENV=development builds with the development conditions and defines (Vite's builder re-resolves each environment with NODE_ENV already set, so React's development build ships); oj took the command's production. environments.<env>.build.sourcemap and environments.client.build.minify are honoured (the Cloudflare Worker gets its source maps, as its upload_source_maps claims; the client's cssMinify follows its own minify); a ?url stylesheet whose module was tree-shaken is not emitted and gets no manifest row; the Node server bundle resolves with Vite's server conditions (module, node, development|production, the ssr environment's own); without an app src/start.* the server's start entry is the framework's default file, named and keyed as Vite names it; under the Cloudflare plugin each environment's output directory is emptied on its own. In the server-function provider an environment function inside a handler stays as written with its import (Start clones the handler before the env-fn pass); a new URL(file?query#hash, import.meta.url) keeps its whole postfix on an emitted file and none on a data URL, and a missing file is rewritten with Vite's '' + import.meta.url form and warning; .mts, .cts and .cjs modules are split like the others; a module above the root takes its ../ path in its id.
  • Plugin host: a non-client environment's environment.config follows Vite's proxy semantics (a key the environment resolves replaces the top-level value; nothing is merged), so lists are no longer doubled and a server environment resolves without browser; the client environment's config.build is its patched build (emitAssets: true, platform: "browser", keepProcessEnv: false); the esbuild minify pass is decided per environment after the config hooks (a hook setting build.minify: "esbuild" got none); build.assetsDir is joined as a posix path (static/js/ gave static/js//[name]-[hash].js); the output options a renderChunk/generateBundle/writeBundle hook receives carry output.dir, the outputOptions-hooked patterns, topLevelVar, exports: "auto", minify and comments as Vite builds them; the extraction keeps an environment-declared ssr.build.emitAssets (Vite's compat step overwrote it with the top level's) and build.target: false; the loader merges environments.client.input with the top-level input as Vite's mergeInput; null defaults are kept as Vite keeps them; no ssr environment is invented for a plain build; the server entry's extension follows the format; config hooks run under the NODE_ENV the app's .env files resolve; the shell's VITE_USER_NODE_ENV and envFile: false are read.
  • TanStack Start compiler: after a directive without ; ('use client' then a newline) the injected RPC import is its own statement (it was written on the directive's line, a syntax error); the whole-program walk for server functions is decided per environment as Start's LookupKindsPerEnv has it (on the client any other factory in the text, on the server the env-only factories or <ClientOnly>; createMiddleware alone does not trigger it on the server), and the server-function manifest is the union of both callers' finds; .validator() with no argument is Start's error; export declare is a type export; import.meta.glob's deprecated as option is not read in a build (rolldown's native plugin, which Vite 8 runs there, knows none, so vite build writes a plain import), while the dev server keeps Vite's JS plugin reading of it (the query, with the default export for raw and url); the mime table is mrmime's (350+ types) plus Vite's four overrides, so an ?url of a .glb or .gltf gets its type.
  • CSS modules under build.cssMinify: false: the sheet is the source with its locals renamed (postcss-modules edits the tree in place and prints the rest verbatim); oj printed it again through lightningcss (blue → #00f, (min-width: 1px) → (width >= 1px), nested rules rewritten). A bare :global .x / :local .x scopes the rest of the selector instead of dropping the rule; css.modules.exportGlobals exports the global classes as themselves in walk order; integer-like class names lead the class map as JavaScript orders object keys; a generateScopedName pattern hashes the escaped selector text (\31 0), as postcss-modules-scope hands it. A .scss imported from a plain .css is compiled before it is inlined (postcss-import's load); a relative url() in an inlined file that names no file stays as written, and an unresolved image-set() string is wrapped in url(); an empty @layer x; last in a conditional import's wrapper loses its ; as postcss prints it.
  • oj build: new URL(file, import.meta.url) is rewritten in place, as Vite's asset-import-meta-url plugin rewrites it: new URL("/assets/file-HASH.ext", '' + import.meta.url) once the chunk renders (a data URL for a file under the inline limit, the URL under the base for a /public file), new Worker(new URL(...)) bundles the worker as its own entry and writes its URL the same way with Vite's /* @vite-ignore */ (or self.location.href for a worker naming itself), a template URL with substitutions becomes the eager ?url glob lookup, a file that is not there stays as its own text with Vite's warning, and a data: URL is left alone; the rewrite runs ahead of the dynamic-import and glob passes, as Vite orders its plugins. oj imported the file as an asset module and read the URL from its binding, which hoisted a var and reordered the chunk's declarations, so every chunk with such a call differed from vite build's.
  • oj build: an HTML src naming a public file is written anew, partially encoded, as Vite's html plugin writes it (/pub%20name.png comes out /pub name.png); only a srcset candidate the base left as it was keeps its own text.
  • oj build of a TanStack Start app: the server bundle is minified only when the config says so (the environment's own build.minify, else an explicit top-level one), with rolldown's dead-code pass and the comments kept otherwise, as Vite's server default is minify: false; oj minified it as the client. Every emitted file (an image, a font, a ?url sheet, a url() target) is named through build.rolldownOptions.output.assetFileNames, with its originalFileName, not only the chunks' sheets, a ?url sheet is listed among its module's assets, and a chunk's manifest assets follow Vite's order (the JS-imported files, each ?url sheet after its own url() files, then the chunk sheet's). The vite:oxc slot lowers nothing by build.target (Vite hands the native plugin environment.config.oxc alone; the target reaches rolldown's bundle-level transform), so a Start build keeps the syntax the target allows.
  • oj build of a TanStack Start app: when a module names another Start factory (createMiddleware, createIsomorphicFn, createServerOnlyFn, createClientOnlyFn) its server functions are found at any depth, as the compiler walks the whole program then (a createServerFn not assigned to a variable, or destructured, is the compiler's error); a spread handler argument is refused as the compiler refuses it; a name declared twice in one module gets versioned handler siblings (a_createServerFn_handler, _1) and distinct ids; a createServerFn from a package that is not TanStack's is not the factory; an isomorphic chain under another member call (.bind(null)) is left as written; a type reference outside an annotation keeps its import through the dead-code pass.
  • import.meta.glob and variable dynamic imports follow rolldown's plugins more closely: options are read in order with the last value of the right type winning (a template query skipped, as const read in TypeScript), base is any text joined to the importer, a bare import.meta.glob() is left as written and not numbered, a relative pattern in a virtual module without a base is the plugin's error, an eager import of a non-identifier export is quoted, a lazy named import is written .then((m) => m[...]), the variable-import rewrite splices the source (the rest byte for byte) instead of printing it again, a dynamic import is detected as the native plugin detects it (import (, a comment before the parenthesis), bases sharing nothing fall back to each pattern's own root instead of /, a conditional imports target walks its keys in order under the client conditions, an alias replacement is posix-normalized, a symlinked directory is walked once where it stands, and Object.keys(import.meta.glob(..), extra) is an ordinary glob.
  • CSS modules: @keyframes :global(x) stays unscoped with its references scoped as postcss-modules-local-by-default leaves them, @value definitions and imports substitute through the sheet and lead the class map, localsConvention: "camelCase" is lodash's camelCase and dashes postcss-modules', a class whose selector needs escaping is looked up by its escaped text, and a composed file's url()s rebase from its own directory in dev. CSS @import inlining follows postcss-import byte for byte: each run of a conditional child's nodes is wrapped on its own (nested chains flattened outer-first, with postcss's whitespace quirks), a @layer between imports under conditions becomes the plugin's data-URL import, a kept import under a chain carries the chain, an import after a rule or after a layer that follows an import is dropped with the plugin's warning, a final import without ; is a statement, a @charset that is not first is dropped, duplicates are keyed on the normalized path, a cycle back to the root inlines it once more, and an unresolvable relative import warns. The CSS resolver no longer tries index.css (Vite's has tryIndex: false).
  • oj build of a TanStack Start app prerenders the pages tanstackStart({ pages, prerender }) names, as vite build does. Start's post-build plugin (tanstack-start-core:post-build, whose buildApp hook runs Start's crawler and its sitemap over the written bundles) was left out of the build host with the framework plugins oj reimplements, so a build with prerender.enabled wrote no <path>/index.html and no sitemap.xml and said nothing; a large app's production build lost every prerendered page. The plugin now runs in a build as Start ships it: it fetches each page from the app's own vite preview (under @cloudflare/vite-plugin that serves the written Worker in workerd, the runtime the deploy runs), crawls links and discovers static paths as the options say, and writes the pages under the client and the sitemap from the pages. On oj's Node server layout the preview's entry, <server outDir>/server.js, is written as a re-export of the server bundle. Two goldens record it against Vite (start-prerender: a page named, one found by crawling; start-cloudflare-prerender: a Worker with the pages named outright, no crawl, a sitemap), and the harness checks the number of prerendered pages on the recording and on oj's build alike.
  • The plugin host's engine: require() of an ES module from CommonJS code works once a module customization hook is registered. Vite's module runner registers one (Module.registerHooks, for its import.meta.resolve), so a plugin that opens the app's own dev server during a build (a sitemap or llms.txt plugin loading app modules with ssrLoadModule in closeBundle) had every CommonJS dependency's require of an ESM-only package fail with Cannot resolve module "./x.js" (sanitize-html requiring htmlparser2): deno_node compiled the hook-resolved file through deno_core's import-with-source path, which instantiates the module without loading its imports. The engine's prelude (oj_js's node_require_esm.mjs, evaluated once per engine) loads such a file by its URL instead, as a required .mjs file loads, keeping Node's CommonJS-first order for a file of undecided format and the original path for a load hook's own source. A test builds an app whose plugin does exactly that through a nested CommonJS → ESM-only dependency.
  • oj build: a browser field mapping a module to false (node-forge's ./lib/node-io.js, a package's fs) resolves to Vite's browser-external stub, one __vite-browser-external module for every such import, where rolldown alone gave each its own empty module. The probe runs only for an importer whose package has such a mapping.
  • oj build's manifest lists a ?worker bundle as Vite's worker cache does: a _worker_<file> row per chunk of the bundle (src, isWorkerEntry, isWorker, its imports by their _worker_ keys, the assets its modules emitted), and the worker's file under the importing chunk's assets.
  • A stylesheet's @import of a package subpath import (#ui/style.css, Node's imports field) resolves through the importer's nearest package.json, as under Vite; the leading # was read as a URL hash and the import kept for the browser.
  • A TanStack Start build's generateBundle hooks see the files oj wrote outside the bundle (a ?url import's, a sheet's url()'s, a worker entry) as the assets Vite's asset plugin emits, named after their sources, with their bytes; a hook deleting one and emitting it again under another name (a post plugin moving images under img/) moves the file, the chunks' importedAssets and the manifest with it.
  • A Cloudflare Worker bundle names its entry, chunks and assets through the app's outputOptions hooks (entryFileNames, chunkFileNames, assetFileNames), as the client bundle does; a function pattern is called per chunk.
  • The server-function resolver module of a Start build renders as Start's own (importer: () => import(...), getServerFnById(id, access) statement for statement), so the chunk holding it matches vite build's.
  • A Cloudflare Worker bundle leaves no import "cloudflare:workers" behind for a binding nothing uses: the runtime's modules and the Worker's Node builtins are externals without side effects, as Vite's resolver marks a builtin.
  • A Cloudflare Worker is built on Start's own server entry (@tanstack/react-start/server-entry, the package's default entry when wrangler's main names none), as Vite builds it, instead of oj's Node entry. oj's @cloudflare/vite-plugin/server shim (getCloudflareContext()) is no longer aliased into the Worker, where the plugin has no such module and an app reads its bindings from cloudflare:workers; the Node server keeps it.
  • A TanStack Start build emits the client's .vite/manifest.json into the bundle at the end of generateBundle, as Vite's manifest plugin does, so a writeBundle hook listing the output directory finds it there and a post plugin's rename is in it.
  • A binary asset a plugin emits (this.emitFile({ type: "asset", source: <Buffer> }), @cloudflare/vite-plugin's .wasm module files) is written byte for byte: the host read every source as text, so a WebAssembly module came out re-encoded as UTF-8 and twice its size, and any byte over 0x7f corrupted. An asset emitted by name from any hook is named under assetFileNames with a hash of its bytes, as rolldown names it (oj wrote a renderChunk hook's emission as assets/<name>), and one emitted again with the same bytes is the one asset under every name, the manifest keeping a row under each original file name with the first as its src, as rolldown dedupes and Vite's manifest lists them.
  • oj build of a TanStack Start app: a .wasm?init import in the client is Vite's wasm plugin's module (initWasm from the helper over the file's URL), as under vite build; oj's Start client read it as the file's URL alone, so the exported function threw.
  • A ?worker bundle's minify and source maps follow the client environment's resolved build.minify and build.sourcemap, as Vite's worker plugin reads the worker environment's config (the client's), and, under builder.sharedPlugins (TanStack Start's), its esbuild minify follows the top-level build.minify alone, as Vite's builder swaps every environment's plugins for the first config's, whose build no per-environment patch touched: a worker under environments.client.build.minify: "esbuild" came out mangled by esbuild and without its map, where Vite writes it unminified with a hidden map.
  • A Start client honours rolldownOptions.output.sourcemapDebugIds: a //# debugId= on each chunk and the id in its map, as rolldown writes them.
  • The preload helper's __VITE_IS_MODERN__ flag is set where Vite's build import analysis sets it: after the app's plugins' renderChunk and before esbuild's minify. oj set it before the app's plugins saw the chunk, so a plugin hashing the chunk there (Sentry's debug id injection) hashed other text than under Vite, and every chunk's hash and id came out different.
  • A Start server's source map covers its server-function provider modules (<file>?tss-serverfn-split): the host chain gave oj's native compile a line map only when the rewrite kept the line count, and the provider's appended export failed that, so the module had no mappings and a stack trace in a server function's handler landed on the module before it in the chunk. The compile takes a line map whatever the count, and the map aligns lines by position first (a generated line equal to the source line at its position maps to it, an edited or new one keeps its place after the last line aligned, a blank left by a deletion anchors nothing), where it drifted to a blank line further on.
  • A ?url sheet's module is written on one line and comes with no map, as vite:css writes and returns it, so a chunk's map names the sheet's source where Vite's does.
  • A Cloudflare Worker environment's output carries the web worker bundles its modules reference (new Worker(new URL("./w.ts", import.meta.url)) in a module the server renders too), as Vite's worker plugin emits them in every environment whose bundle keeps the referencing module live: the worker output cache is the config's, shared by the environments, and a Worker environment emits assets. oj wrote them under the client alone, so the Worker's manifest named a _worker_ file its own directory did not hold. The Worker environment's generateBundle hooks also see its sheets and those worker files in the bundle, as under Vite; they saw the chunks alone.
  • .vite/manifest.json joins the bundle a build's generateBundle hooks read where Vite's manifest plugin emits it: a build post plugin, after the app's, so only an app hook with order: "post" finds the manifest in the bundle. oj's host handed it in before any hook ran, so an unordered hook listing the bundle saw a file Vite's would not, in every environment. Pinned by a host unit test and by the start-preserve-symlinks golden, whose Worker environment records what its generateBundle sees.