diff --git a/src/client/index.jsx b/src/client/index.jsx index 92d0d60a..de32ee85 100644 --- a/src/client/index.jsx +++ b/src/client/index.jsx @@ -2,24 +2,21 @@ import { unmountComponentAtNode, render as reactRender } from 'react-dom'; import { syncHistoryWithStore } from 'react-router-redux'; import { browserHistory } from 'react-router'; import { useBasename } from 'history'; -import { install as installSourceMapSupport } from 'source-map-support'; import RedBox from 'redbox-react'; import { Resolver } from 'react-resolver'; -/* eslint-disable import/no-extraneous-dependencies */ +/* eslint-disable import/no-extraneous-dependencies,import/newline-after-import,import/first */ +// used require instead of import, because optional default with import cause warnings +const reducers = require('__app_modules__redux_reducers__'); import routes from '__app_modules__routes__'; -import * as reducers from '__app_modules__redux_reducers__'; import middlewares from '__app_modules__redux_middlewares__'; import { parse as stateParser } from '__app_modules__redux_stateSerializer__'; -/* eslint-enable import/no-extraneous-dependencies */ +/* eslint-enable import/no-extraneous-dependencies, import/newline-after-import */ import { create as createStore, createRootReducer } from '../shared/store'; import config from '../../config'; import App from './components/App'; - -if (process.env.NODE_ENV !== 'production') { - installSourceMapSupport({ environment: 'browser' }); -} +/* eslint-enable import/first */ function render(history, store, appRoutes, element) { const insertCss = ({ _insertCss }) => _insertCss(); diff --git a/src/server/middlewares/store.js b/src/server/middlewares/store.js index 6d0c6a9c..f70cbdcb 100644 --- a/src/server/middlewares/store.js +++ b/src/server/middlewares/store.js @@ -1,10 +1,16 @@ import { createMemoryHistory } from 'react-router'; + /* eslint-disable import/no-extraneous-dependencies */ -import * as reducers from '__app_modules__redux_reducers__'; import middlewares from '__app_modules__redux_middlewares__'; +// used require instead of import, because optional default with import cause warnings +const reducers = require('__app_modules__redux_reducers__'); /* eslint-enable import/no-extraneous-dependencies */ + + +/* eslint-disable import/first */ import { create as createStore } from '../../shared/store'; import config from '../../../config'; +/* eslint-enable import/first */ export default () => (ctx, next) => { const history = createMemoryHistory({