Gathering detailed insights and metrics for fast-sass-loader-china
Gathering detailed insights and metrics for fast-sass-loader-china
npm install fast-sass-loader-china
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
2,448
Last Day
1
Last Week
4
Last Month
10
Last Year
103
55 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Mar 28, 2017
Minified
Minified + Gzipped
Latest Version
1.2.5
Package Id
fast-sass-loader-china@1.2.5
Size
8.81 kB
NPM Version
5.4.0
Node Version
6.9.1
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
0%
4
Compared to previous week
Last Month
-50%
10
Compared to previous month
Last Year
-35.2%
103
Compared to previous year
High performance sass loader for webpack 1/2.
Features:
sass-loader
in large sass project@ import
same file in different placeurl(...)
(see https://github.com/webpack-contrib/sass-loader#problems-with-url)fast sass loader for webpack. 5~10 times faster than sass-loader, and support url resolve.
Good News: Now fast-sass-loader
support webpack 2
sass-loader
Features | fast-sass-loader | sass-loader |
---|---|---|
Performance | Fast (5~10 times) | Slow |
Sass Dedupe | ✓ | × |
Url Resolve | ✓ | × (need resolve-url-loader, it's buggy) |
Loader Config | × | ✓ |
Source Map | × | ✓ |
Internal Cache | ✓ | × |
performance benchmark:
1************** RUN WITH FAST SASS LOADER ************** 2Hash: 37ed419b014ff87f0461 3Version: webpack 2.2.1 4Time: 7457ms 5 Asset Size Chunks Chunk Names 6dist/index.js 2.67 kB 0 [emitted] index 7 index.css 627 kB 0 [emitted] [big] index 8 [0] ./index.scss 41 bytes {0} [built] 9 [1] ../~/.0.23.1@css-loader/lib/css-base.js 1.51 kB [built] 10Child extract-text-webpack-plugin: 11 [0] ../~/.0.23.1@css-loader/lib/css-base.js 1.51 kB {0} [built] 12 [1] ../~/.0.23.1@css-loader!../lib!./index.scss 648 kB {0} [built] 13 14[build] fast-sass-loader: 9348.760ms 15 16 17************** RUN WITH SASS LOADER ************** 18Hash: 0b034e431d1a93826d38 19Version: webpack 2.2.1 20Time: 64124ms 21 Asset Size Chunks Chunk Names 22dist/index.js 2.67 kB 0 [emitted] index 23 index.css 6.95 MB 0 [emitted] [big] index 24 [0] ./index.scss 41 bytes {0} [built] 25 [1] ../~/.0.23.1@css-loader/lib/css-base.js 1.51 kB [built] 26Child extract-text-webpack-plugin: 27 [0] ../~/.0.23.1@css-loader/lib/css-base.js 1.51 kB {0} [built] 28 [1] ../~/.0.23.1@css-loader!../~/.6.0.3@sass-loader/lib/loader.js!./index.scss 7.18 MB {0} [built] 29 30[build] sass-loader: 64892.699ms
Since the sass-loader
doesn't dedupe repeated sass files, the result will be very very large (6.95MB!!!), and the total compile time takes 64.9 seconds (nearly 6 times longer than fast-sass-loader
).
fast-sass-loader
is faster than sass-loader
?node-sass
won't compile same file repeatedly, the performance improvement is s ignificant when your sass files number grows very large.fast-sass-loader
will merge all sass files into a single file, so node-sass only need to compile one large file, it's faster than @importer
of libsass.install by npm:
1npm install fast-sass-loader --save-dev
and you need install node-sass and webpack as peer dependencies.
{
module: {
rules: [
{
test: /\.(scss|sass)$/,
use: [
'css-loader',
{
loader: 'fast-sass-loader',
options: {
includePaths: [ ... ]
}
}
]
},
// other loaders ...
]
}
}
{
module: {
loaders: [
{
test: /\.(scss|sass)$/,
loader: 'css!fast-sass'
},
// other loaders ...
]
}
}
An array of paths that node-sass can look in to attempt to resolve your @import declarations. When using data, it is recommended that you use this.
If you want to prepend Sass code before the actual entry file, you can set the data option. In this case, the loader will not override the data option but just append the entry's content. This is especially useful when some of your Sass variables depend on the environment:
1{ 2 loader: "fast-sass-loader", 3 options: { 4 data: "$env: " + process.env.NODE_ENV + ";" 5 } 6}
Please note: Since you're injecting code, this will break the source mappings in your entry file. Often there's a simpler solution than this.
.scss
and.sass
file is not allowedSince fast-sass-loader
will parse @import
and merge all files into single sass file, you cannot import .scss
file from .sass
(or opposite).
For example:
1// file: entry.scss 2@import "path/to/file.sass"; // cannot import `path/to/file.sass` in a `.scss` file 3 4body { 5 background: #FFF; 6}
Since fast-sass-loader
will dedupe sass file, later imported file will be ignored. Using same variable name in different sass fill would produce unexpected output.
For example (compile entry.scss
with fast-sass-loader):
1// a.scss 2$foobar: #000;
1// b.scss 2@import "a.scss"; 3$foobar: #AAA; 4 5h1 { color: $foobar; }
1// entry.scss 2@import "b.scss"; 3@import "a.scss"; // this file will be ignore: $foobar === #AAA 4 5h2 { color: $foobar; } 6 7// will output: 8// h1 { color: #AAA; } 9// h2 { color: #AAA; }
You can use variable prefix to bypass.
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 0/17 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
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
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
Score
Last Scanned on 2025-03-03
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