react-bolt
react-bolt copied to clipboard
IE11 Support
It seems the current setup of the boilerplate / webpack does not support IE11. The following error is produced:
IE: Error: Unable to get property 'apply' of undefined or null reference.
I tried updating the babel-polyfill but it seems nothing is working. Any advice?
Well, I think this might be a problem, don't know how to fix that yet 😐
@leonardomso from a quick look (or 1-2 hours now 😄 ) I believe its the redux devtools, i changed it to this:
import { createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from 'redux-devtools-extension/developmentOnly';
import thunk from 'redux-thunk';
import logger from 'redux-logger';
import rootReducer from './reducers';
const middleware = applyMiddleware(thunk, logger);
// const reduxDevTools =
// window.__REDUX_DEVTOOLS_EXTENSION__ &&
// window.__REDUX_DEVTOOLS_EXTENSION__()
const store = createStore(
rootReducer,
composeWithDevTools(
middleware
)
);
export default store;
One other step I have taken (but which did not produce results) was to add a CDN script import in index.html to import polyfills
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.4.4/polyfill.min.js"></script>
As I said this CDN was not fixing the issue, had to change the dev tools - but I am keeping it for backup, as i need my app to run on IE11. This was apparently suggested by a number of people.
Well, if you find any solution for this issue, feel free to send a PR, I'll love to merge
Okay, so I have been reviewing this issue some this morning.
From the Core-js repo:
@babel/polyfill IS just the import of stable core-js features and regenerator-runtime for
generators and async functions, so if you load @babel/polyfill - you load the global version
of core-js without ES proposals.
The problem, as you know, is the needed polyfill for legacy browsers. I do not have a way to test, since I do not have a IE11 system, but it looks like react-app-polyfill might be a good fit for the legacy systems. It would be as simple as installing the package, and including in the first line of src/index.js:
// This must be the first line in src/index.js
import 'react-app-polyfill/ie11';
Wow, thanks for that @eclectic-coding. I will see if I can find some time this week to do some upgrades in this boilerplate and include the react-app-polyfill for IE11 support. Thanks, man.