Closed esiao closed 8 years ago
👍 , but I'm getting Error: Cannot find module 'history/createBrowserHistory' from
during build
Oops, it's because it's supposed to be history 4.2.0 in package.json instead of 3.2.0 (before you needed /history/lib/createBrowserHistory). Sorry.
Thanks! Could you also please run npm run dev
and see if Karma tests pass with history@4.2.0?
There are 6 failures. Query: ✗ should parse query params from location Location: ✗ should visit root state automatically after start ✗ should update URL after start ✗ should update URL after visiting another state ✗ should update URL after visiting same state with different params ✗ should support optional URL params with defaults
The log warn is No states match URL: /context.html
.
Could it be the test needs to be rewritten? Testing on my project both hash and non hash navigation works. Tested on Chome latest and IE9 with Modern IE box.
Thanks, I'll take a look at those when I got the chance
There's an issue with history versions inferior to 3.x.x in that Chrome on iOS hard refresh the page when used on iOS. It was fixed in this pull request https://github.com/mjackson/history/pull/208
This fork updates the version of history used and reflects the changes done to the api. Tested on real life application and works like a charm. Just needed to manually trigger matchLocation as listen doesn't seem to trigger when instantiated anymore.