I am using babel-preset-env version - 1.6.1 for my react app, i am getting a error on IE :- Object doesn\'t support property or method \'assign\'
You need Babel Polyfill.
Either import it in your entry JS file, or use Webpack.
import "babel-polyfill";
or in webpack.config.js
module.exports = {
entry: ["babel-polyfill", "./app/main"]
}
NOTE : babel-polyfill
Should be imported on very top else It will not work
(Source)
Please use core-js instead.
import "core-js/stable";
import "regenerator-runtime/runtime";
Or with Webpack:
module.exports = {
entry: ["core-js/stable", "regenerator-runtime/runtime", "./app/main"]
}
In my case the above webpack config did not work! because I was also lacking a promise polyfill. This is the webpack.config I ended up using:
entry: { 'main': ['core-js/fn/promise', 'core-js/stable/object/assign', './wwwroot/src/app.js'] },