There are some caveats if we still want to target IE11 as supported browser.
These package versions should be pinned to this especific versions, unless their code or dependencies have some es6 only compatible, because their maintainers mainly target the node world.
- "query-string": "4.1.0"
- "superagent": "3.8.2"
Then in the project that should target it, these changes are required:
add as a dependency
yarn add @babel/polyfill
See https://babeljs.io/docs/en/babel-polyfill for more updated information
@babel/preset-env, that supports including
package.json. So you can add this to
"browserslist": [ "last 2 version", "IE 11" ],
This supports the query specific DSL for
browserlist targeting the browsers
that you need to add.
Some packages in
node_modules are ES6 only, for some older browsers, you might want to add a pre (or post) transpiling. There's a script
pre-build-transpiling.js (Volto root folder) that might help you with it. Also this command line might help:
./node_modules/.bin/babel --presets="@babel/env" XXX --out-dir XXX