Skip to content
This repository has been archived by the owner on Mar 10, 2023. It is now read-only.

Commit

Permalink
fix: remove source-map-client support because of warnings (#245)
Browse files Browse the repository at this point in the history
* fix: remove source-map-support client and warns from reducers import

* style: eslint imports fix

* style: disable some import aslant rules

* style: eslint imports rules

* style: eslint fix
  • Loading branch information
alepee authored Feb 20, 2017
1 parent 229d8d3 commit 8d86c52
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
13 changes: 5 additions & 8 deletions src/client/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
8 changes: 7 additions & 1 deletion src/server/middlewares/store.js
Original file line number Diff line number Diff line change
@@ -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({
Expand Down

0 comments on commit 8d86c52

Please sign in to comment.