Babel Preset does not provide support on IE11 for Object.assign - "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


Babel Polyfill is outdated as of Babel 7.4.0

(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'] },