Gathering detailed insights and metrics for craco-babel-loader
Gathering detailed insights and metrics for craco-babel-loader
Gathering detailed insights and metrics for craco-babel-loader
Gathering detailed insights and metrics for craco-babel-loader
Rewire babel-loader loader in your create-react-app project using CRACO.
npm install craco-babel-loader
Typescript
Module System
Node Version
NPM Version
44.4
Supply Chain
49.1
Quality
62.8
Maintenance
50
Vulnerability
92.8
License
TypeScript (39.06%)
JavaScript (31.69%)
HTML (24.12%)
CSS (5.13%)
Total Downloads
4,845,558
Last Day
1,272
Last Week
17,539
Last Month
68,352
Last Year
929,203
MIT License
25 Stars
22 Commits
4 Forks
1 Watchers
2 Branches
3 Contributors
Updated on Oct 16, 2024
Minified
Minified + Gzipped
Latest Version
1.0.4
Package Id
craco-babel-loader@1.0.4
Unpacked Size
24.28 kB
Size
4.62 kB
File Count
12
NPM Version
8.1.0
Node Version
16.13.0
Cumulative downloads
Total Downloads
Last Day
153.9%
1,272
Compared to previous day
Last Week
12.5%
17,539
Compared to previous week
Last Month
-3.8%
68,352
Compared to previous month
Last Year
-36.3%
929,203
Compared to previous year
1
2
This is a port of react-app-rewire-babel-loader to CRACO
instead of react-app-rewired. react-app-rewired
was not being updated for version 2 of CRA, and I wanted to use the rewired babel loader with a solution designed for CRA 2.
Rewire
babel-loader
loader in yourcreate-react-app
project usingCRACO
.
Say there is an awesome library you found on npm that you want to use within your un-ejected create-react-app
project, but unfortunately, it's published in ES6+ (since node_modules
doesn't go through babel-loader
), so you cannot really use it. It's also effective for working with monorepos which was my original use case.
However, with CRACO
and this library, craco-babel-loader
, you can use that awesome library you've found.
See below for usage.
1$ yarn add craco-babel-loader 2# npm v5+ 3$ npm install craco-babel-loader 4# before npm v5 5$ npm install --save craco-babel-loader
1// crago.config.js 2// see: https://github.com/sharegate/craco 3 4const path = require("path"); 5const fs = require("fs"); 6 7const rewireBabelLoader = require("craco-babel-loader"); 8 9// helpers 10 11const appDirectory = fs.realpathSync(process.cwd()); 12const resolveApp = relativePath => path.resolve(appDirectory, relativePath); 13 14module.exports = { 15 plugins: [ 16 //This is a craco plugin: https://github.com/sharegate/craco/blob/master/packages/craco/README.md#configuration-overview 17 { plugin: rewireBabelLoader, 18 options: { 19 includes: [resolveApp("node_modules/isemail")], //put things you want to include in array here 20 excludes: [/(node_modules|bower_components)/] //things you want to exclude here 21 //you can omit include or exclude if you only want to use one option 22 } 23 } 24 ] 25} 26
node.js
and npm
. See: https://github.com/creationix/nvm#installationyarn
. See: https://yarnpkg.com/en/docs/installnpm
dependencies. Run: yarn install
yarn run lint
yarn run pretty
yarn run test
yarn run prepublish
yarn run build
MIT.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 1/22 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
44 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More