Changelog - 2026-10-26
Chunks keep import order, and buildInfoFile writes build-info.json
New Feature Behavior ChangeIn one line. The preset's vite.config.mts sets output.strictExecutionOrder: true, so a production build cannot run a split chunk before reflect-metadata; and the new Node-only entry @venizia/ardor/vite exports buildInfoFile, which writes build-info.json for an About page. Both need Vite 8.3.5 or newer. Available in 0.4.4.
ts
import { buildInfoFile } from '@venizia/ardor/vite';What changed
output.strictExecutionOrder: truein the preset. Rolldown can run a split-off chunk before the module a DI package depends on, and a build then fails in the browser withReflect.getMetadata is not a functionwhilevite devworks (vitejs/vite#21866). The flag is the fix the Vite team gives. It costs about 3.4% of the gzip size of a four-chunk app, all in the cachedvendorchunk. See Vite setup.buildInfoFilein@venizia/ardor/vite. It emitsbuild-info.jsoninto the build and serves it on the dev server:service,version,commit,branch,builtAtfrom the pipeline variables or git, andframeworks, the installed version of each@venizia/*dependency, sorted. The text is the same for the same input. A build with no commit in the pipeline or in git fails and says how to fix it; the dev server serves what it has and warns.IBuildInfoFilein@venizia/ardor-kerneland@venizia/ardoris the type of the file, for the code that reads it.- Optional peers of
@venizia/ardor:vite(>=8.3.5) and@venizia/ignis-boot(^0.4.1), needed only by./vite.
Who is affected
- A new app from the preset. Nothing to do: the flag is in its config.
- An app already generated from the preset. Optional but recommended: add
strictExecutionOrder: truetobuild.rolldownOptions.outputof itsvite.config.mts, and keep Vite at 8.3.5 or newer. - An app with its own Vite plugin that puts
import 'reflect-metadata'before DI modules (areflectMetadataFirstplugin). Replace it with the flag; see the steps below. - An app that wants an About page. Use
buildInfoFile.
Upgrade steps for an app with its own reflectMetadataFirst and buildInfoFile
- Bump
viteto 8.3.5 or newer. An app on Vite 8.1.0 reportedReact$12 is not definedwith the flag on; 8.3.5 builds and loads in a real browser. - Add
strictExecutionOrder: truetobuild.rolldownOptions.outputof the Vite config. - Build, open the built app in a real browser (
vite preview) and check the console. Then delete the app'sreflectMetadataFirstplugin and its import. - Replace the app's own
buildInfoFilewithimport { buildInfoFile } from '@venizia/ardor/vite'and delete its copy and its test. Differences to expect: the keys have a fixed order,frameworksis sorted,commitis the 12-character short form and no longer the 40-character one, the dev server answers onlyGETandHEAD, and a build with no commit fails instead of writingunspecified; passonUnresolved: 'unspecified'to keep the old behaviour. Passrootif Vite does not run in the app folder. - Type the About page with
IBuildInfoFilefrom@venizia/ardor.
The wiki page Vite setup has the options, the sources of each field and the numbers.