Changelog - 2026-10-18
Decorators work in a split chunk without importing reflect-metadata first
Bug FixIn one line. @inject and the other decorators no longer depend on the order a bundler evaluates modules in.
What changed
- The registry imports
reflect-metadata. The only module in@venizia/ignis-inversionthat callsReflect.*Metadatais the metadata registry, and it now starts withimport 'reflect-metadata'. Before, the import lived only in the package entry; Vite 8 (Rolldown) can run a split chunk of decorated code before that entry (vitejs/vite#21866), which threwReflect.getMetadata is not a function. - Same package, same builds.
reflect-metadatawas already a dependency, and the CommonJS and ESM builds both carry the import.
Who is affected
- Applications built with Vite 8. The
reflect-metadata-firstplugin workaround can go once this release is installed; keeping it does no harm. - Everyone else. No action needed.