I want to support IE11 (e.g. NodeList.forEach
) in my project using babel inside webpack, but I find it confusing to select the right babel package.
Current packages are:
"@babel/core": "^7.6.4",
"@babel/preset-env": "^7.6.3",
"babel-loader": "^8.0.6",
"webpack": "^4.41.1",
"webpack-cli": "^3.3.9"
Possible candiates are:
The packages
core-js/stable
andregenerator-runtime/runtime
(as proposed in@babel/polyfill
page)
my current webpack.config
options: {
compact: false,
presets:
[["@babel/env", {//env preset
"targets": {
"browsers": ["last 2 Chrome versions", "last 2 Firefox versions", "Explorer >= 11"]
}
}]]
}
Can someone explain what each of these package does and what package/configuration should I include in order for IE11 to be able to support NodeList.forEach
.