Changelog - 2026-10-18
Auto artifacts in Vite builds
FeatureIn one line. IgnisArtifactsVitePlugin.create() in vite.config.ts makes import AutoArtifacts from '@venizia/ignis-boot/auto' work in a Vite-built frontend or Worker.
What changed
@venizia/ignis-boot/vite. The plugin servesignis:artifacts, swaps the auto module for an eager import of it (a browser bundle is tree-shaken only when eager), and inlinesArtifactGroup.define/applicationcalls - whatIgnisArtifactsPlugindoes forBun.build.- Names survive minification, for the scanned classes only. Binding keys are built from
Class.name, so the plugin opens each scanned class with a static block that pins its name; the rest of the bundle minifies as usual (a bundle-widekeepNamescost about 100 KB on a measured frontend). - An import cycle is named. An index entry that is not a class - what a cycle leaves when the module importing the index also defines a decorated class - stops registration with a message naming the cause, instead of a crash on
.name. - Borrowed classes keep their names; a kit can define groups in the browser. The plugin also scans the src of every package that defines a group, so classes borrowed from a shared kit are pinned like the application's own.
ArtifactGroupis exported from@venizia/ignis-kernel/metadata, so a browser kit defines its groups without the root barrel and its server peers. - Adding a class needs a dev server restart. The class list is built once, when
vite devstarts; editing a class keeps hot reload. - Every decorated class keeps its name. The pin covers every class with an IGNIS decorator in the application and its workspace dependencies, not only the scanned ones - a workspace library that defines no group still provides injection targets.
Bun.buildpins names too.IgnisArtifactsPluginpins the scanned classes' names the same way, so a registered class that subclasses a same-name class (Bun's scope hoisting renames itStockService2) keeps its key. The binary guide now also says howBun.buildkeepsNODE_ENVa runtime read (define, sinceenv: 'disable'alone does not).- The scanner runs under Node. It globs with
node:fsinstead ofBun.Glob, so the plugin works in a Vite process started by Node.
Who is affected
- Frontends that keep a generated index, a side-effect import list or hand-pinned binding keys. Add the plugin, pass
AutoArtifactsinartifacts, and delete them. - Everyone else. No change.