There is possble idea like using inversify.js however my idea is avoiding importing unused library.
I used craco to handle some features in webpack for v0.7.0. By that we can implement plugins feature. First we need to add a directory like src/plugins/plugin-name then each plugin can have yaml or json config file. Config file can be like :
{
kind: redux.middleware.v1
main: index.js
...
}
We suppose this plugin should be added in redux middleware list in configureStore.*.ts.
We can add a separated file like reduxMiddleware.ts which export the list of middleware.
Possible steps could be:
From craco config file read the redux middleware plugins.
Add plugins import code to reduxMiddleware.ts file.
There is possble idea like using inversify.js however my idea is avoiding importing unused library.
I used craco to handle some features in webpack for v0.7.0. By that we can implement plugins feature. First we need to add a directory like
src/plugins/plugin-name
then each plugin can have yaml or json config file. Config file can be like :We suppose this plugin should be added in redux middleware list in configureStore.*.ts.
We can add a separated file like reduxMiddleware.ts which export the list of middleware.
Possible steps could be:
What is your idea @kapilip?