fix anonymous default exports

This commit is contained in:
Labhansh Agrawal 2023-07-25 21:41:02 +05:30
parent 162b58eed8
commit 692f94a87a
20 changed files with 58 additions and 20 deletions

View file

@ -9,8 +9,10 @@ import {composeWithDevTools} from '@redux-devtools/extension';
import type {HyperState, HyperActions} from '../../typings/hyper';
const thunk: ThunkMiddleware<HyperState, HyperActions> = _thunk;
export default () => {
const configureStoreForDevelopment = () => {
const enhancer = composeWithDevTools(applyMiddleware(thunk, plugins.middleware, thunk, writeMiddleware, effects));
return createStore(rootReducer, enhancer);
};
export default configureStoreForDevelopment;

View file

@ -8,5 +8,7 @@ import writeMiddleware from './write-middleware';
import type {HyperState, HyperActions} from '../../typings/hyper';
const thunk: ThunkMiddleware<HyperState, HyperActions> = _thunk;
export default () =>
const configureStoreForProd = () =>
createStore(rootReducer, applyMiddleware(thunk, plugins.middleware, thunk, writeMiddleware, effects));
export default configureStoreForProd;

View file

@ -1,10 +1,11 @@
import configureStoreForProduction from './configure-store.prod';
import configureStoreForDevelopment from './configure-store.dev';
export default () => {
const configureStore = () => {
if (process.env.NODE_ENV === 'production') {
return configureStoreForProduction();
}
return configureStoreForDevelopment();
};
export default configureStore;