Awilix integration for Vite projects, version 2.0.3. Provides a `loadModules` function that bridges Awilix's module loading with Vite's `import.meta.glob` for automatic dependency registration. Unlike loadModules in awilix itself (which uses glob patterns and file system scanning), this plugin relies on Vite's static analysis for dynamic imports. Requires manual use of `import.meta.glob` and does not work with lazy glob patterns. Ships TypeScript types. Designed for client-side or SSR Vite setups.
npm install awilix-viteVerified import paths — ran on the pinned version, not inferred.
Shows how to create an Awilix container, use import.meta.glob with eager=true, and load modules with lifecycle options.
Use { eager: true } in import.meta.glob call.Use a hardcoded glob pattern, not a variable.
Import createContainer and other Awilix primitives from 'awilix/browser'.
Provide a formatName function that matches your naming convention.
npm install awilix-vite and ensure import is from 'awilix-vite' (not 'awilix').
Use import { loadModules } from 'awilix-vite'.Add '{ eager: true }' and ensure glob pattern matches at least one file.