First of all, thanks a million for making this IE8 compatible react repository available. We're in route to production and suddenly told that we have to support IE8 because the business hasn't completed it's IE8 decommissioning project on time.
The issue I've noticed is if you do the debug build yarn build:debug then the app fails to load in IE8.
I get Expected Identifier error in vendor bundle
if (true) {
var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
===> Symbol.for &&
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
must be the default: obj
I found If I always to the Uglify call then it works...
if (!DEBUG) {
config.plugins.push(new webpack.optimize.DedupePlugin())
}
// Must always be done or it won't work in IE8
config.plugins.push(new webpack.optimize.UglifyJsPlugin({
compress: { warnings: VERBOSE, screw_ie8: false },
mangle: { screw_ie8: false },
output: { screw_ie8: false },
}))
if (!DEBUG) {
config.plugins.push(new webpack.optimize.AggressiveMergingPlugin())
config.module.loaders
.find(x => x.loader === 'babel-loader').query.plugins
.unshift(
'transform-react-remove-prop-types',
'transform-react-constant-elements',
'transform-react-inline-elements',
'transform-es3-modules-literals',
'transform-es3-member-expression-literals',
'transform-es3-property-literals'
)
}
I tried changing it so it didn't compress or mangle, but still did the output screw_ie8 but that caused the same problem.