You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
771 B

  1. import { createStore, applyMiddleware, compose } from 'redux';
  2. import thunk from 'redux-thunk';
  3. import appReducer from '../reducers';
  4. import loadingBarMiddleware from '../middleware/loading_bar';
  5. import errorsMiddleware from '../middleware/errors';
  6. import soundsMiddleware from 'redux-sounds';
  7. import Howler from 'howler';
  8. import Immutable from 'immutable';
  9. Howler.mobileAutoEnable = false;
  10. const soundsData = {
  11. boop: '/sounds/boop.mp3'
  12. };
  13. export default function configureStore() {
  14. return createStore(appReducer, compose(applyMiddleware(
  15. thunk,
  16. loadingBarMiddleware({ promiseTypeSuffixes: ['REQUEST', 'SUCCESS', 'FAIL'] }),
  17. errorsMiddleware(),
  18. soundsMiddleware(soundsData)
  19. ), window.devToolsExtension ? window.devToolsExtension() : f => f));
  20. };