craco-babel-loader-plugin v1.0.3 is a CRACO plugin that allows overriding babel-loader configuration in Create React App projects to transpile dependencies (e.g., ES6+ or TypeScript) from node_modules or monorepo siblings. It is an updated fork of craco-babel-loader with TypeScript migration and latest @craco/craco support. Unlike alternatives, it provides explicit include/exclude options. Release cadence is low; last update May 2021.
npm install craco-babel-loader-pluginVerified import paths — ran on the pinned version, not inferred.
Shows how to configure craco-babel-loader-plugin to transpile the isemail module from node_modules while keeping other node_modules excluded.
Use const rewireBabelLoader = require('craco-babel-loader-plugin').default;Use path.resolve or fs.realpathSync to construct absolute paths before passing to includes/excludes.
Switch to craco-babel-loader-plugin v1.x.
Check @craco/craco compatibility with your react-scripts version.
Types are included; if missing, install @types/craco-babel-loader-plugin or define custom types.
npm install craco-babel-loader-plugin --save-dev
Use const rewireBabelLoader = require('craco-babel-loader-plugin').default;Ensure you have babel-loader installed: npm install babel-loader --save-dev
Ensure plugin is wrapped in { plugin: ..., options: { includes: [...], excludes: [...] } }.