Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
crass-loader
Advanced tools
Crass loader module for webpack.
npm install crass-loader --save-dev
Using crass-loader with css-loader.
module.exports = {
...
module: {
rules: [
{
test: /\.css$/,
use: [
'css-loader',
'crass-loader'
]
}
]
}
};
Default: true
crass
optimizes by default.
Use 'optimize: false' to avoid optimization.
module.exports = {
...
module: {
rules: [
{
test: /\.css$/,
use: [
'css-loader',
{
loader: 'crass-loader',
options: {
optimize: false
}
}
]
}
]
}
};
Default: false
crass
can do O1 optimization, but doesn't do so by default.
Use 'o1: true' to enable.
ATTN: Will only work if 'optimize: true'
module.exports = {
...
module: {
rules: [
{
test: /\.css$/,
use: [
'css-loader',
{
loader: 'crass-loader',
options: {
o1: true
}
}
]
}
]
}
};
With the pretty
option Crass will prettify the output.
module.exports = {
...
module: {
rules: [
{
test: /\.css$/,
use: [
'css-loader',
{
loader: 'crass-loader',
options: {
pretty: true
}
}
]
}
]
}
};
Use the saveie
option to get Crass to specifically support Internet Explorer 6 and below.
module.exports = {
...
module: {
rules: [
{
test: /\.css$/,
use: [
'css-loader',
{
loader: 'crass-loader',
options: {
saveie: true
}
}
]
}
]
}
};
Default: chr39,fx31,ie11,op26
Set a comma-separated list of browser versions to instruct Crass to strip CSS that would otherwise only apply to browsers older than the versions listed. For example 'ie9,fx30' would strip CSS that applies only to Firefox 29 and below and Internet Explorer 8 and below. The following prefixes are supported: ie, op, fx, chr
module.exports = {
...
module: {
rules: [
{
test: /\.css$/,
use: [
'css-loader',
{
loader: 'crass-loader',
options: {
min: 'ie1,fx5,chr1'
}
}
]
}
]
}
};
Use the css4
option to get Crass to allow optimized output to contain CSS4 features and syntax. Note that this may not be supported in all modern browsers.
module.exports = {
...
module: {
rules: [
{
test: /\.css$/,
use: [
'css-loader',
{
loader: 'crass-loader',
options: {
css4: true
}
}
]
}
]
}
};
MIT © Patrick Eriksson
FAQs
Crass loader module for webpack
We found that crass-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.