Compatibility
Browserslist
In an ESBoot project, browser compatibility is configured with the browserslist field in package.json.
{
"browserslist": {
"development": ["last 1 chrome version"],
"production": ["Chrome >= 67"]
}
}
For Multi Platforms mode, you can define different production targets per platform, such as:
pc-native-productionpc-browser-productionmobile-native-productionmobile-browser-production
See the official browserslist docs for all supported queries.
Packages Inside node_modules
Normally, packages in node_modules are excluded from compilation. If a modern package ships syntax that is too new for your target, you can force it through Babel using extraBabelIncludes.
Notes
- Compiling extra packages from
node_moduleswill slow down builds. - This only works in the
webpackbundler because other bundlers do not use Babel in the same way.