
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
css-modules-escaper
Advanced tools
postcss-plugin/webpack-loader for escape css-modules's compile
The animation of inline style will not work when you use css-modules with css-loader, and this project will make it work.
.test1 {
animation: 3s linear 1s demo1;
width: 100px;
height: 100px;
background-color: red;
}
@keyframes demo1 {
from {
transform: translateX(0px);
}
to {
transform: translateX(300px);
}
}
._SLSqn_M6Y6lv44JVeE6 {
animation: 3s 1s linear demo1;
width: 100px;
height: 100px;
background-color: red;
}
@keyframes demo1 {
from {
transform: translateX(0px);
}
to {
transform: translateX(300px);
}
}
// ...
const WebpackCssModuleEscaper = require('css-modules-escaper');
module.exports = {
// ...
module: {
rules: [
{
test: /\.less$/i,
use: [
'style-loader',
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
esModule: false,
modules: {
localIdentName: '[hash:base64]',
getLocalIdent: (context, localIdentName, localName) => {
return null;
}
}
}
},
// add escaper loader
'css-modules-escaper',
'less-loader',
],
},
]
},
plugins: [
// add escaper plugin
new WebpackCssModuleEscaper.plugin(),
// ...
]
}
// ...
const WebpackCssModuleEscaper = require('css-modules-escaper');
module.exports = {
// ...
module: {
rules: [
{
test: /\.less$/i,
use: [
'style-loader',
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
esModule: false,
modules: {
localIdentName: '[hash:base64]',
getLocalIdent: (context, localIdentName, localName) => {
return null;
}
}
}
},
{
loader: 'postcss-loader',
options: {
postcssOptions: {
plugins: [
require.resolve('css-modules-escaper/src/postcss-plugin')
],
},
},
},
'less-loader',
],
},
]
},
plugins: [
new WebpackCssModuleEscaper.plugin(),
// ...
]
}
0.0.3
FAQs
postcss-plugin/webpack-loader for escape css-modules's compile
The npm package css-modules-escaper receives a total of 2 weekly downloads. As such, css-modules-escaper popularity was classified as not popular.
We found that css-modules-escaper 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
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.