babel-preset-turbo
raw JSON → 0.0.6 verified Sat Apr 25 auth: no javascript abandoned
An opinionated Babel preset intended for use with the Turbo build system (likely Turborepo). Current version 0.0.6, last updated in 2018. No active maintenance or recent releases. Provides a minimal configuration for Babel-transpiled code in Turbo projects. Differentiates by being purpose-built for Turbo, but has been superseded by more comprehensive presets and official Turborepo tooling.
Common errors
error Error: Cannot find module 'babel-preset-turbo' ↓
cause Package not installed or not in node_modules.
fix
Run npm install --save-dev babel-preset-turbo
error Error: Plugin/Preset files are not allowed to export objects, only functions. ↓
cause Trying to import the preset as an object instead of a string in config.
fix
Use the preset name as a string: ["babel-preset-turbo"]
Warnings
deprecated Package is unmaintained since 2018. No compatibility with modern Babel versions or TypeScript. ↓
fix Use a modern preset like @babel/preset-env or @babel/preset-react with Turborepo.
gotcha Preset does not include any transform plugins; it's essentially a no-op. May cause confusion when expected polyfills. ↓
fix Add required plugins manually or switch to a full-featured preset.
gotcha Preset name in config must be the package name string, not a function call. ↓
fix Use 'babel-preset-turbo' as a string in the presets array.
Install
npm install babel-preset-turbo yarn add babel-preset-turbo pnpm add babel-preset-turbo Imports
- default wrong
const babelPresetTurbo = require('babel-preset-turbo')correctimport babelPresetTurbo from 'babel-preset-turbo' - preset wrong
module.exports = { presets: [require('babel-preset-turbo')] }correctmodule.exports = { presets: ['babel-preset-turbo'] } - config wrong
{ "presets": ["./node_modules/babel-preset-turbo"] }correct{ "presets": ["babel-preset-turbo"] }
Quickstart
// Install
// npm install --save-dev babel-preset-turbo
// .babelrc
{
"presets": ["babel-preset-turbo"]
}
// Or babel.config.js
module.exports = {
presets: ['babel-preset-turbo']
};