Babel:Config
lastmod 2026-11-10created 2020-09-282 edits
The Babel configuration file determines which presets and plugins Babel applies when transforming JavaScript. There are two kinds: babel.config.js (or .json), which applies to the whole project, and .babelrc, which applies per directory; a common setup is to specify targets in @babel/preset-env so that syntax is transformed to match the range of browsers to support. Settings that differ by environment can be separated with the env key.