Polyfill for ie
If you are using Webpack, find your webpack.base.conf.js
file (mine was in the build
folder), or the equivalent webpack configuration file, then modify the app entry variable to include babel-polyfill
at the start so it looks something like this:
entry: { app: ['babel-polyfill', ...] }, . . .
@doulmi
Add this to your package.json file:
"babel-polyfill": "^6.20.0"
After that npm install
.
Add this at the top of you main js file:
import "babel-polyfill";
Compile everything. That should work.