react-router: version 2.4 breaking IE8 compatibility
Version
2.4.0
Test Case
http://jsbin.com/fatabufupe/1/edit (jsbin doesn’t work in IE8 😃
Steps to reproduce
import { Router } from ‘react-router’; just importing react-router@2.4.0 breaks IE8 compatibility
Expected Behavior
should work as v2.3.0
Actual Behavior
it throws an error “throw TypeError(“Accessors not supported!”);”

Bable config
{
"presets": ["react", "stage-1", "es2015-loose-native-modules", "es2015-loose" ],
"env": {
"development": {
"plugins": [
"transform-es3-property-literals",
"transform-es3-member-expression-literals",
"transform-object-rest-spread"
]
}
}
}
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 16 (8 by maintainers)
Thank Aweary, we are using react version 0.14.7, which does support IE8, If react router has dropped support for IE8 from version 2.4 then it should have stated that in the release notes just like react has from version 0.15.0
That fixes an issue with Babel 6’s default exports and CommonJS usage. It doesn’t fix anything with IE8.
The issue is coming from our generated code. You can see it in the UMD build: https://npmcdn.com/react-router@2.4.0/umd/ReactRouter.js Those
Object.defineProperty’s with the getters at the top are the problem, as getters aren’t polyfillable and aren’t supported in IE8.Ah why I didn’t think of that 😃 that is best for now thanks @timdorr