di-loader
Dependency Injection webpack bundler
Installation
npm i -S di-loader
Usage
First add plugin to the list of webpack's plugins.
// webpack.config.jsconst ExtractDIPlugin = ; moduleexports = // ... plugins: // ... src: './src/js/collections' './src/js/components' './src/js/models' './src/js/states' { return !~filepath; }
After that you can use suitable loaders to access dependencies
, resolvers
and container
.
// entry.js; // dependencies hashmap; // resolvers hashmap; // configured di container