Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
node-sass-glob-importer
Advanced tools
Custom importer for node-sass which makes it possible to use glob syntax in Sass import statements
Custom node-sass importer to which allows you to use glob syntax in imports
Globbing allows pattern matching operators to be used to match multiple files at once.
// Import all files inside the `scss` directory and subdirectories.
@import: 'scss/**/*.scss';
const sass = require('node-sass');
const globImporter = require('node-sass-glob-importer');
sass.render({
...
importer: globImporter()
...
});
// webpack.config.js
const globImporter = require('node-sass-glob-importer');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
module: {
rules: [
{
test: /\.scss$/,
use: [
{
loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader'
}, {
loader: 'sass-loader',
options: {
sassOptions: {
importer: globImporter()
}
}
}
]
}
]
},
plugins: [
new MiniCssExtractPlugin({
filename: 'style.css'
})
]
}
node-sass --importer node_modules/node-sass-glob-importer/dist/cli.js -o dist src/index.scss
It is not possible anymore to set the includePaths
option when initializing the importer. Use the node-sass includePaths option instead.
This module is maintained in one repository together with multiple other node-sass custom importers. The node-sass-magic-importer repository is using a monorepo approach with fixed versions for all packages. The projects maintained in the node-sass-magic-importer monorepo started out as separate repositories with separate versioning, so when they were integrated into the monorepo, the versions of all projects were raised to 5.0.0 and are in sync since then.
This module is powered by node-sass-magic-importer.
Markus Oberlehner
Website: https://markus.oberlehner.net
Twitter: https://twitter.com/MaOberlehner
PayPal.me: https://paypal.me/maoberlehner
Patreon: https://www.patreon.com/maoberlehner
MIT
FAQs
Custom importer for node-sass which makes it possible to use glob syntax in Sass import statements
The npm package node-sass-glob-importer receives a total of 53,820 weekly downloads. As such, node-sass-glob-importer popularity was classified as popular.
We found that node-sass-glob-importer 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.