-
-
Notifications
You must be signed in to change notification settings - Fork 650
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* accept hot module changes, move routes into root component * Fix "You cannot change <Router routes>; it will be ignored" error message by implementing solution in Github: remix-run/react-router#2704 (comment) Router is only instantiated once in a production setting (e.g. not webpack-dev-server), so there is minimal overhead on producing a random key value for `Router`.
- Loading branch information
Showing
5 changed files
with
68 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,30 @@ | ||
{ | ||
"plugins": [ | ||
[ | ||
"transform-runtime", { | ||
"helpers": false, | ||
"polyfill": false, | ||
"regenerator": true, | ||
"moduleName": "babel-runtime" | ||
} | ||
], | ||
["module-resolver", { | ||
"root": ["./common"], | ||
"alias": { | ||
"underscore": "lodash" | ||
}, | ||
"cwd": "babelrc" | ||
}], | ||
"react-hot-loader/babel"], | ||
"presets": ["es2015", "react", "stage-0", "flow"], | ||
"env": { | ||
"production": { | ||
"presets": ["react-optimize"] | ||
"plugins": [ | ||
[ | ||
"transform-runtime", | ||
{ | ||
"helpers": false, | ||
"polyfill": false, | ||
"regenerator": true, | ||
"moduleName": "babel-runtime" | ||
} | ||
], | ||
[ | ||
"module-resolver", | ||
{ | ||
"root": ["./common"], | ||
"alias": { | ||
"underscore": "lodash" | ||
}, | ||
"cwd": "babelrc" | ||
} | ||
], | ||
"react-hot-loader/babel" | ||
], | ||
"presets": ["es2015", "react", "stage-0", "flow"], | ||
"env": { | ||
"production": { | ||
"presets": ["react-optimize"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { browserHistory } from 'react-router'; | ||
import { useBasename } from 'history'; | ||
|
||
export const history = getHistory(); | ||
|
||
function getHistory() { | ||
const basename = ''; | ||
return useBasename(() => browserHistory)({ basename }); | ||
} |
This file was deleted.
Oops, something went wrong.