
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
fbem-css-loader
Advanced tools
Warning
- To use fbem-css-loader, webpack@5 is required
- mini-css-extract-plugin is required
This package is a fork of css-loader. However, CSS modules are enabled by default and all CSS is parsed according to BEM naming convention. So, you can export special functions from CSS files. Take a look below.
npm i -D fbem-css-loader
webpack.config.js
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
module: {
rules: [
{
test: /\.css$/i,
use: [MiniCssExtractPlugin.loader, "fbem-css-loader"],
},
],
},
};
/* style.css */
.block {
position: relative;
}
.block__elem {
color: purple;
}
.block__elem_mod_val-a {
backgound: white;
}
.block__elem_mod_val-b {
backgound: black;
}
.block__name-with-dashes {
display: none;
}
.block__name-with-dashes_visible {
display: block;
}
/* index.js */
import { cnBlock, cnBlockElem, cnBlockNameWithDashes } from './style.css';
cnBlock(); // 'block'
cnBlockElem({ mod: 'val-a' }); // 'block__elem block__elem_mod_val-a'
cnBlock(['mix']); // 'block mix'
cnBlockElem({ mod: 'val-b' }, ['mix1', 'mix2']); // 'block__elem block__elem_mod_val-b mix1 mix2'
cnBlockNameWithDashes({ visible: true }); // 'block__name-with-dashes block__name-with-dashes_visible'
FAQs
functional bem css loader module for webpack
We found that fbem-css-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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.