@duude92/lazyinject-vite
v0.0.7
Published
Vite plugin designed to bundle application which uses [LazyInject DI](https://github.com/Duude92/lazyinject) container.
Readme
lazyinject-vite
Vite plugin designed to bundle application which uses LazyInject DI container.
Installation
npm install @duude92/lazyinject-vite --save-devQuick start
- Setup
lazyinject.config.jswith catalogs, which has dependencies. Example:
// lazyinject.config.js
module.exports = {
catalogs: ['src', 'src/implementations'],
};- Setup vite plugin within your vite.config.ts:
export default defineConfig({
plugins: [viteLazyInject()],
});Example
01-vite-samplecontain example of web application, which uses LazyInject as DI container, bundled using vite with dependencies in-code02-vite-samplecontain example of web application, which uses LazyInject as DI container, bundled using vite with dependencies set from lazyinject.config.js
License
This project is open source and available under the MIT License.
Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
