Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
mixedstyle-loader
Advanced tools
loads mixed style imports e.g. sass/css/stylus from one file while maintaining their order
The loader that should not even exist. But who doesn't like to nurse a bunch of legacy code.
It consumes css files with css @import
statements and other css code.
The magic is that those @import
statements can go to any kind of css
or css
-precompiler file, as long as there is a proper loader existing and configured for it.
imagine you have 3 files a.css
, b.sass
, and c.scss
and you need to load them in the order:
* `c.scss`
* `b.sass`
* `a.css`
so you create a file d.css
which looks as follows:
@import 'c.scss';
@import 'b.sass';
@import 'a.css';
then you will probably run into a couple of issues:
css-loader
will fail trying to interpret sass
and scss
sass-loader
will hoist all *.css
imports assuming you are too stupid to know where they belongmixedstyle
to the rescue!assuming you still have your d.css
file just add this to your loader:
loaders: [
{
test: /\W?d\.css$/,
loader: "mixedstyle"
}
]
or probably you want to use it for the Extract-Text-Plugin, in that case do:
loaders: [
{
test: /\W?d\.css$/,
loader: ExtractTextPlugin.extract("style-loader", "mixedstyle")
}
]
or simply go for inline
var x = require('mixedstyle!./d.css');
//or
var x = require('style!mixedstyle!./d.css');
FAQs
loads mixed style imports e.g. sass/css/stylus from one file while maintaining their order
The npm package mixedstyle-loader receives a total of 69 weekly downloads. As such, mixedstyle-loader popularity was classified as not popular.
We found that mixedstyle-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.