Browserslist
Chef uses browserslist to determine target browsers for Babel transpilation and PostCSS autoprefixing.
By default, Chef targets baseline widely available — browsers with widely available support for modern web features.
How it works
- If
targetsis specified inbundle.config.ts, Chef uses it directly - Otherwise, Chef looks for a
.browserslistrcfile up the directory tree from the extension - If no file is found, the default
baseline widely availableis used
Custom targets
Specify targets directly in the config:
ts
export default {
// ...
targets: ['last 2 versions', 'not dead'],
};Or create a .browserslistrc file in the project root (use chef init build to generate one):
baseline widely availableMigrating from browserslist
The browserslist option in bundle.config is deprecated. Use targets instead:
ts
// Before
export default {
browserslist: ['last 2 versions'],
};
// After
export default {
targets: ['last 2 versions'],
};The old browserslist option continues to work for backwards compatibility.