Gathering detailed insights and metrics for customize-cra-less-loader
Gathering detailed insights and metrics for customize-cra-less-loader
Gathering detailed insights and metrics for customize-cra-less-loader
Gathering detailed insights and metrics for customize-cra-less-loader
Add less loader to any create-react-app using customize-cra
npm install customize-cra-less-loader
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
14 Stars
18 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Sep 20, 2024
Latest Version
2.0.0
Package Id
customize-cra-less-loader@2.0.0
Unpacked Size
15.03 kB
Size
4.34 kB
File Count
7
NPM Version
6.14.15
Node Version
12.22.8
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Add less loader to any create-react-app
using customize-cra
.
Support with css-loader
v3.
Only support
react-scripts
version >=v5.0.0
.
If PR 255 been merged into master, you don't need this modules
First, install customize-cra-less-loader, less and less-loader packages:
1npm i -D customize-cra-less-loader less less-loader 2// or yarn add --dev customize-cra-less-loader less less-loader
After it's done, call addLessLoader in override like below:
1const { override } = require("customize-cra"); 2const addLessLoader = require("customize-cra-less-loader"); 3 4module.exports = override(addLessLoader(loaderOptions));
loaderOptions
is optional. If you have Less specific options, you can pass to it. For example:
1const { override } = require("customize-cra"); 2const addLessLoader = require("customize-cra-less-loader"); 3 4module.exports = override( 5 addLessLoader({ 6 cssLoaderOptions: { 7 sourceMap: true, 8 modules: { 9 localIdentName: "[hash:base64:8]", 10 }, 11 }, 12 lessLoaderOptions: { 13 lessOptions: { 14 strictMath: true, 15 }, 16 }, 17 }) 18);
Check Less document for all available specific options you can use.
Once less-loader
is enabled, you can import .less
file in your project.
And .module.less
will use CSS Modules.
if you use TypeScript (npm init react-app my-app --typescript) with CSS Modules, you should edit react-app-env.d.ts.
1declare module "*.module.less" { 2 const classes: { [key: string]: string }; 3 export default classes; 4}
DefinitelyTyped only works because of contributions by users like you!
Follow the Angular git commit message specification
But, you can ignore the scope
MIT RoXoM xyy94813@sina.com
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/18 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
65 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
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