Installations
npm install fast-css-loader
Score
75.4
Supply Chain
90.9
Quality
74.4
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Developer
yibn2008
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
No
Node Version
7.9.0
NPM Version
4.2.0
Statistics
22 Stars
8 Commits
4 Watching
1 Branches
1 Contributors
Updated on 01 May 2024
Bundle Size
79.83 kB
Minified
24.27 kB
Minified + Gzipped
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
906,717
Last day
63.2%
710
Compared to previous day
Last week
8%
2,498
Compared to previous week
Last month
6%
9,947
Compared to previous month
Last year
-43.3%
102,869
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
fast-css-loader
Blazingly fast css loader for webpack (about 10 times faster than css-loader when process large css files)
install
1npm install fast-css-loader --save-dev
VS css-loader
fast-css-loader has higher performance when processing large css files, here is an example when process a 24200+ lines css file:
1------------------------------------- 2 CSS_LOADER COST: 1644 ms 3 FAST_CSS_LOADER COST: 116 ms 4-------------------------------------
Why faster?
fast-css-loader rewrites resolving parts of @import
and url(...)
with RegExp
and some tricks, it's extramely faster than postcss used by css-loader.
Limitations
Compare with css-loader, fast-css-loader has these limitations:
- doesn't support sourceMap
- doesn't support minimize (you can minimize css with mini-css-extract-plugin)
- doesn't support
camelCase
option - doesn't support css module
If you really need these features, just use original css-loader :)
Usage
just like css-loader:
1module.exports = { 2 module: { 3 rules: [ 4 { 5 test: /\.(svg|bmp|gif|png|jpe?g)$/, 6 loader: require.resolve('file-loader'), 7 options: { 8 name: '[name].[hash:8].[ext]' 9 } 10 }, 11 { 12 test: /\.css$/, 13 use: [ 14 'style-loader', 15 'fast-css-loader' // replace you css-loader with fast-css-loader 16 ] 17 }, 18 ] 19 } 20}
Options
Name | Type | Default | Description |
---|---|---|---|
root | {String} | / | Path to resolve URLs, URLs starting with / will not be translated |
url | {Boolean} | true | Enable/Disable url() handling |
alias | {Object} | {} | Create aliases to import certain modules more easily |
import | {Boolean} | true | Enable/Disable @import handling |
importLoaders | {Number} | 0 | Number of loaders applied before CSS loader |
The above listed options are consistent with css-loader, for more detail please refer to css-loader options
License
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
Found 0/8 approved changesets -- score normalized to 0
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'
Score
3
/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 More