Registry / serialization / babel-preset-react-app-webpack-5

babel-preset-react-app-webpack-5

JSON →
library10.0.0jsnpmunverified

Forked Babel preset from Create React App, updated for Webpack 5 compatibility. Version 10.0.0 is the latest. This preset configures Babel for React projects with support for Flow and TypeScript, enabling JSX transformation, object rest/spread, absolute runtime paths, and polyfills. Unlike the official 'babel-preset-react-app' which targets Webpack 4, this fork ensures compatibility with Webpack 5 while maintaining the same API. Useful for ejected CRA projects or custom setups requiring Webpack 5.

npm install babel-preset-react-app-webpack-5
INSTALL
IMPORT
SIG · BABEL-PRESET-REACT
B
babel-preset-react-app-webpack-5
serializationjavascriptv10.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
module.exports = require('babel-preset-react-app-webpack-5')
import preset from 'babel-preset-react-app-webpack-5'
This package exports a CommonJS module; ESM import is not supported directly. Use require in Node/Babel config.
createTransformer
const { createTransformer } = require('babel-preset-react-app-webpack-5')
import { createTransformer } from 'babel-preset-react-app-webpack-5'
createTransformer is a named export for custom Jest transforms; still require-based.

Shows how to use the preset in .babelrc for a React project with optional TypeScript and relative runtime paths.

// .babelrc { "presets": ["react-app"] } // Or with options: { "presets": [ ["react-app", { "flow": false, "typescript": true, "absoluteRuntime": false }] ] }
Debug
Known issues
breakingRemoved support for @babel/plugin-proposal-private-property-in-object. Upgrade to version 10+ to avoid build errors.
fix
Update to babel-preset-react-app-webpack-5@10.0.0 or later.
affects: <10.0.0
breakingDropped support for Node.js 10 and 12. Minimum Node 14 required.
fix
Use Node 14+.
affects: >=10.0.0
breakingPreset name must be 'react-app' in Babel config; not 'babel-preset-react-app-webpack-5'.
fix
Use "presets": ["react-app"] in .babelrc.
affects: >=10.0.0
gotchaAbsoluteRuntime defaults to true, causing import path errors if runtime is not installed. Set absoluteRuntime: false if not using @babel/runtime.
fix
Add { "absoluteRuntime": false } to preset options.
affects: >=10.0.0
deprecatedThe 'useBuiltIns' option is deprecated and will be removed in a future version. Polyfills should be handled separately.
fix
Configure core-js or @babel/preset-env useBuiltIns directly.
affects: >=10.0.0
Errors
Common errors & fixes
Error: Cannot find module '@babel/plugin-proposal-private-property-in-object'
Plugin removed in v10, but older configs reference it.
fix
Update to babel-preset-react-app-webpack-5@10.0.0 or remove plugin from Babel config.
Error: Requires Babel "^7.0.0", but was loaded with "7.12.0"
Incompatible Babel version. Requires 7.x but <7.12.
fix
Install @babel/core@^7.12.0.
TypeError: Cannot read property 'bind' of undefined
Absolute runtime path issue with @babel/runtime not present.
fix
Set { absoluteRuntime: false } in preset options or install @babel/runtime@^7.12.0.
SyntaxError: Support for the experimental syntax 'classProperties' isn't currently enabled
Missing @babel/plugin-proposal-class-properties.
fix
Ensure babel-preset-react-app-webpack-5 is correctly added; it includes this plugin.
Upgrade
Version history
10.0.0latest on npm
Audit
Dependencies
@babel/corerequiredPeer dependency required for Babel preset to function.
Agent activity
19 hits · last 30 days
node
16
OpenAI (training)
1
Resources
babel-preset-react-app-webpack-5 — npm install babel-preset-react-app-webpack-5 · libregistry