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-jaidVerified import paths — ran on the pinned version, not inferred.
Shows typical .babelrc usage and programmatic ESM import with options for React, minification, and target.
Switch to import syntax or update to latest version. For .babelrc.js, use module.exports = require('babel-preset-jaid').default.Update react option to one of the allowed string values or boolean.
If you need ava or flow support, pin to v11 or add the plugins manually.
Configure path aliases manually in your project if needed.
If using react-hot-loader, migrate to react-refresh. The preset now uses react-refresh/babel.
Update to v17 which is ESM-only, or configure your bundler to handle CommonJS.
Run npm install --save-dev babel-preset-jaid@^17.0.0
Use import syntax or use require('babel-preset-jaid').default in CommonJS.Set react option to one of: false, true, 'lib', 'dom', 'dom-lib'.