philipwalton / webpack-esnext-boilerplate

513 stars 41 forks source link

IE11 promise polyfill #14

Closed SetiZ closed 4 years ago

SetiZ commented 5 years ago

Hello, I think this issue is more a question for help on a problem I am having. Sorry if it's not the right medium. First let me say this boilerplate is on point to my problem. It really helped find the right path to fix the code for IE10/11. But I still have some problems here. My main problem was the use if chunks for legacy, which I removed and now i have a semblant of code working, aka the console.log is showing in IE11. But then I get a lot of errors saying : Unhandled promise rejection TypeError: Target is not iterable.

Comparing what babel do on your code and mine, I see some difference :

// I am missing this one
transform-async-to-generator
// Why this one is showing on mine and not yours?
syntax-dynamic-import
// this one is the main reason it doesn't work on my code. You got it since you get whatwg-fetch, 
// but I don't use it, should I import it anyway?
es.array.iterator

Also, why everything is in the devDependencies on your project?

SetiZ commented 4 years ago

I find the solution with this: https://babeljs.io/docs/en/babel-plugin-syntax-dynamic-import#working-with-webpack-and-babel-preset-env