import { createStore , applyMiddleware , compose } from 'redux' ; import ReduxThunk from 'redux-thunk' ; import { createLogger } from 'redux-logger' ; import rootReducer from '../reducers/index' ; import * as settingsUIActions from '../actions/settingsUI' ; import * as settingsDataActions from '../actions/settingsData' ; import * as appUIActions from '../actions/appUI' ; import * as requestBuilderActions from '../actions/requestBuilder' ; import * as responseViewerActions from '../actions/responseViewer' ; import * as listServicesActions from '../actions/serviceList' ; import * as nodeProcessActions from '../actions/nodeProcess' ; declare const window ; declare const module ; const actionCreators = { settingsUIActions , settingsDataActions , appUIActions , requestBuilderActions , responseViewerActions , listServicesActions , nodeProcessActions } ; const logger = ( createLogger ) ( { level : 'info' , collapsed : true , } ) ; const composeEnhancers = window . __REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window . __REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ( { actionCreators , } ) as any : compose ; const enhancer = composeEnhancers ( applyMiddleware ( logger , ReduxThunk ) ) ; function configureStore ( initialState ? ) { const store = createStore ( rootReducer , initialState , enhancer ) ; if ( module . hot ) { module . hot . accept ( '../reducers' , ( ) => store . replaceReducer ( require ( '../reducers' ) ) ) ; } return store ; } export default configureStore ;