Insert Polyfills for Webpack 2
npm install webpack2-polyfill-pluginnpm install webpack2-polyfill-plugin --save
javascript
var Webpack2Polyfill = require("webpack2-polyfill-plugin");
module.exports = {
//...
plugins: [
new Webpack2Polyfill()
]
};
`
Compatible:
IE.9 and above (Currently)
Why not IE8 ?
IE8 can't use Object.defineProperty with non-DOM Object. So can't do polyfill with some Webpack2 Usage (Ex: Using defineProperty at exports` for Harmony Export).