Legacy Browser Support (IE11 compatibility)
Legacy Browser Support (IE11 compatibility)#
There are some caveats if we still want to target IE11 as supported browser.
This documentation is orientative. Volto does NOT support legacy or vendor deprecated browsers (as in IE11).
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.js world.
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/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