Installations
npm install craco-babel-loader
Developer
rjerue
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
Yes
Node Version
16.13.0
NPM Version
8.1.0
Statistics
25 Stars
22 Commits
4 Forks
1 Watching
2 Branches
3 Contributors
Updated on 16 Oct 2024
Languages
TypeScript (39.06%)
JavaScript (31.69%)
HTML (24.12%)
CSS (5.13%)
Total Downloads
Cumulative downloads
Total Downloads
4,406,904
Last day
-9%
3,565
Compared to previous day
Last week
-8.3%
17,917
Compared to previous week
Last month
5.4%
78,376
Compared to previous month
Last year
-30.3%
1,132,190
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Peer Dependencies
1
Dev Dependencies
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.
Install
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
Usage
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
Development
node.js
andnpm
. See: https://github.com/creationix/nvm#installationyarn
. See: https://yarnpkg.com/en/docs/installnpm
dependencies. Run:yarn install
Chores
- Lint:
yarn run lint
- Prettier:
yarn run pretty
- Test:
yarn run test
- Pre-publish:
yarn run prepublish
- Build:
yarn run build
License
MIT.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 1/22 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/release.yml:1
- Warn: no topLevel permission defined: .github/workflows/tests.yml:1
- Info: no jobLevel write permissions found
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/rjerue/craco-babel-loader/release.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/rjerue/craco-babel-loader/release.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:7: update your workflow using https://app.stepsecurity.io/secureworkflow/rjerue/craco-babel-loader/tests.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:8: update your workflow using https://app.stepsecurity.io/secureworkflow/rjerue/craco-babel-loader/tests.yml/master?enable=pin
- Info: 0 out of 4 GitHub-owned GitHubAction dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 4 are checked with a SAST tool
Reason
35 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-hpx4-r86g-5jrg
- Warn: Project is vulnerable to: GHSA-prr3-c3m5-p7q2
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6
- Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc
- Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx
- Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j
- Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j
- Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986
- Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
Score
2.5
/10
Last Scanned on 2024-11-18
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 MoreOther packages similar to craco-babel-loader
craco-babel-loader-plugin
CRACO plugin for babel-loader
craco-esbuild
Use [esbuild](https://github.com/evanw/esbuild) in your [create-react-app](https://create-react-app.dev/) with [craco](https://github.com/gsoft-inc/craco) for faster compilation, development and tests.
babel-loader
babel module loader for webpack
@craco/craco
Create React App Configuration Override, an easy and comprehensible configuration layer for create-react-app.