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-5Verified import paths — ran on the pinned version, not inferred.
Shows how to use the preset in .babelrc for a React project with optional TypeScript and relative runtime paths.
Update to babel-preset-react-app-webpack-5@10.0.0 or later.
Use Node 14+.
Use "presets": ["react-app"] in .babelrc.
Add { "absoluteRuntime": false } to preset options.Configure core-js or @babel/preset-env useBuiltIns directly.
Update to babel-preset-react-app-webpack-5@10.0.0 or remove plugin from Babel config.
Install @babel/core@^7.12.0.
Set { absoluteRuntime: false } in preset options or install @babel/runtime@^7.12.0.Ensure babel-preset-react-app-webpack-5 is correctly added; it includes this plugin.