Skip to content

Commit

Permalink
changes react-router imports to use the 'react-router/lib' strategy w…
Browse files Browse the repository at this point in the history
…hich

results in smaller builds. fixes mui#1
  • Loading branch information
ctrlplusb committed Jul 3, 2016
1 parent 3d9e77e commit 8cee8f9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/client/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import React from 'react';
import { render } from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import { Router, browserHistory, match } from 'react-router';
import Router from 'react-router/lib/Router';
import browserHistory from 'react-router/lib/browserHistory';
import match from 'react-router/lib/match';
import routes from '../shared/routes';

// Get the DOM Element that will host our React application.
Expand Down
4 changes: 3 additions & 1 deletion src/server/middleware/universalReactApp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react';
import { RouterContext, match, createMemoryHistory } from 'react-router';
import RouterContext from 'react-router/lib/RouterContext';
import createMemoryHistory from 'react-router/lib/createMemoryHistory';
import match from 'react-router/lib/match';
import render from '../htmlPage/render';
import routes from '../../shared/routes';

Expand Down
3 changes: 2 additions & 1 deletion src/shared/routes/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import Route from 'react-router/lib/Route';
import IndexRoute from 'react-router/lib/IndexRoute';
import App from '../components/App';

function handleError(err) {
Expand Down

0 comments on commit 8cee8f9

Please sign in to comment.