Why does Object.assign() require a polyfill when babel-loader is being used?
问题 I'm attempting to use Object.assign() in an ES6 web app compiled by Babel with webpack, but I'm getting an error: Uncaught TypeError: Object.assign is not a function I'm already using babel-loader to transpile ES6 to ES5, so all my other ES6 code is working. Yet, Object.assign() only works after I also import "babel-core/polyfill" in my codebase. I see that I can also fix this by importing babel-runtime, but I'd like to understand why Object.assign() requires more than what babel-loader