Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
default
✓ In .babelrc: { "presets": ["buildo"] }
✗ require('babel-preset-buildo') in babel.config.js
Used as a Babel preset in configuration files, not imported in code.
with options
✓ { "presets": [["buildo", { "env": "react" }]] }
✗ { "presets": ["buildo", { "env": "react" }] }
Options are passed as an array with preset name first, then options object.
environment detection
✓ Set BABEL_ENV or NODE_ENV to 'react' to automatically use react preset
✗ Setting env option in preset options while also using BABEL_ENV/react-preset separately
The preset's env option overrides automatic detection from BABEL_ENV.
Basic setup of babel-preset-buildo with React env and custom browser targets.
// Install
npm install --save-dev babel-preset-buildo
// .babelrc
{
"presets": [
["buildo", {
"env": "react",
"targets": {
"chrome": 52,
"node": 4
}
}]
]
}
// Run Babel
npx babel src --out-dir lib
Errors
Common errors & fixes
Error: Cannot find module 'babel-preset-env'
Missing peer dependency babel-preset-env.
fixnpm install --save-dev babel-preset-env
Error: Plugin/Preset files are not allowed to export objects, only functions.
Using Babel 7+ which expects module formats that export functions, but babel-preset-buildo may export an object.
fixUse Babel 6 or migrate to @babel/preset-env.
ReferenceError: regeneratorRuntime is not defined
Using async/generator functions without including babel-polyfill or @babel/polyfill.
fixAdd 'useBuiltIns': 'usage' option or import '@babel/polyfill'.
Audit
Dependencies
babel-preset-envrequiredCore dependency for environment-based transpilation
babel-preset-reactoptionalRequired when env is set to 'react'
babel-plugin-transform-class-propertiesrequiredPlugin for class properties transform
babel-plugin-transform-object-rest-spreadrequiredPlugin for object rest/spread transform