Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
csso-webpack-plugin
Advanced tools
Why is not csso-loader or postcss-csso?
Full restructuring in bundles:
No problems with custom syntax like css-modules – :global(.c .d) .a { color: #fff; }
Possible to generate both pure and minimized versions at the same time.
npm i -D csso-webpack-plugin
For node
< 8.0.0 use 1.x version with csso@^3
:
npm i -D csso-webpack-plugin@1
Plugin good to use in pair with ExtractTextPlugin or MiniCssExtractPlugin.
const CssoWebpackPlugin = require('csso-webpack-plugin').default;
module.exports = {
module: { /* ... */ },
plugins: [
new MiniCssExtractPlugin({
filename: "[name].css",
chunkFilename: "[id].css"
}),
new CssoWebpackPlugin(),
]
}
new CssoWebpackPlugin([options: CssoOptions], [filter: function | RegExp])
Arguments:
options
— csso options.options.pluginOutputPostfix
— function(file) or string postfix, if passed, plugin will create two assets vanilla and compressed.
Example:
{
plugins: [
new ExtractTextPlugin('test.css'),
new CssoWebpackPlugin({ pluginOutputPostfix: 'min' })
/* Generated:
test.css — uncompressed file
test.min.css — minimized with csso file
*/
]
}
filter
— Detect should be file processed. Defaults: to ends with .css
.I don't now why, but plugin ships with flow typings (typedef too). To use them in your project, add this to the [libs]
section of your .flowconfig
:
[libs]
node_modules/csso-webpack-plugin/lib/index.js.flow
FAQs
CSSO minification files to serve your webpack bundles
The npm package csso-webpack-plugin receives a total of 79,639 weekly downloads. As such, csso-webpack-plugin popularity was classified as popular.
We found that csso-webpack-plugin 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
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.