Registry / devops / babel-preset-jaid

babel-preset-jaid

JSON →
library17.0.0jsnpmunverified

A personal Babel preset collection by Jaid that aims to minimize boilerplate for JavaScript projects. Current stable version is v17.0.0, released in 2022. The preset includes curated plugins for modern JavaScript, React, and optional minification. Key differentiators: pure ESM exports since v17, custom options for React (false/true/"lib"/"dom"/"dom-lib"), and built-in path aliases. It differs from other presets like @babel/preset-env by bundling multiple plugins into a single config, reducing setup overhead. Maintenance is sporadic, with breaking changes across major versions.

npm install babel-preset-jaid
INSTALL
IMPORT
SIG · BABEL-PRESET-JAID
B
babel-preset-jaid
devopsjavascriptv17.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import preset from 'babel-preset-jaid'
const preset = require('babel-preset-jaid')
ESM-only since v17; do not use require().
PluginConfig
import type { PluginConfig } from 'babel-preset-jaid'
import { PluginConfig } from 'babel-preset-jaid'
TypeScript type export, runtime import will fail. Use 'import type'.
default (in .babelrc.js)
module.exports = require('babel-preset-jaid').default
module.exports = require('babel-preset-jaid')
Since ESM-only, require() returns an object with .default. Use this pattern in CommonJS .babelrc.js files.

Shows typical .babelrc usage and programmatic ESM import with options for React, minification, and target.

// Install: npm install --save-dev babel-preset-jaid // .babelrc { "presets": [ ["babel-preset-jaid", { "react": true, "minify": false, "target": "node" }] ] } // Or programmatically (ESM): import preset from 'babel-preset-jaid'; const options = { react: true, minify: false, target: 'node' }; const config = preset({}, options); console.log('Configured Babel with preset', Object.keys(config));
Debug
Known issues
breakingv17.0.0: Enabled ESM by default. The package now only exports ESM; CommonJS require() breaks.
fix
Switch to import syntax or update to latest version. For .babelrc.js, use module.exports = require('babel-preset-jaid').default.
affects: >=17
breakingv13.0.0: Option 'react' must now be false, true, "lib", "dom", or "dom-lib". Boolean true/false no longer sufficient.
fix
Update react option to one of the allowed string values or boolean.
affects: >=13
breakingv12.0.0: Removed support for ava and flow. Plugins for these are no longer included.
fix
If you need ava or flow support, pin to v11 or add the plugins manually.
affects: 12
breakingv14.0.0: Temporarily disabled reading Jest config; path aliases are now static (root, src, lib).
fix
Configure path aliases manually in your project if needed.
affects: 14
deprecatedv13.1.0: Switched from react-hot-loader/babel to react-refresh/babel. The old plugin is deprecated.
fix
If using react-hot-loader, migrate to react-refresh. The preset now uses react-refresh/babel.
affects: >=13.1
gotchaThe preset uses dynamic requires internally; may cause issues with bundlers that don't support CommonJS in dependencies.
fix
Update to v17 which is ESM-only, or configure your bundler to handle CommonJS.
affects: <17
Errors
Common errors & fixes
Error: Cannot find module 'babel-preset-jaid'
Package not installed or incorrect path.
fix
Run npm install --save-dev babel-preset-jaid@^17.0.0
Error [ERR_REQUIRE_ESM]: require() of ES Module
Using CommonJS require() with ESM-only package (v17+).
fix
Use import syntax or use require('babel-preset-jaid').default in CommonJS.
Error: preset-jaid: Unknown option 'react' with value 'string'
V13+ changed react option to accept only specific string values.
fix
Set react option to one of: false, true, 'lib', 'dom', 'dom-lib'.
Upgrade
Version history
17.0.0latest on npm
Audit
Dependencies
@babel/corerequiredPeer dependency required for Babel compilation.
@babel/clioptionalOptional CLI dependency for command-line compilation.
Agent activity
2 hits · last 30 days
node
2
Resources
babel-preset-jaid — npm install babel-preset-jaid · libregistry