Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
css-extract-plugin
Advanced tools
Extracts CSS into separate files and remove generated by webpack empty javascript files.
The plugin extracts CSS into separate files and remove generated by webpack empty javascript files.
The purpose of this plugin is to do the same as these plugins:
This plugin is replacement of these two plugins, 2 in 1, do it more efficient and much faster.
The webpack-remove-empty-scripts
plugin is a hard addon for the mini-css-extract-plugin
to fix bug/feature in webpack.
It needed extra CPU und RAM resources. Webpack built resources slower than could be,
because must do needless steps which we can spare if do it at same steps in one plugin.
webpack.config.js
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const RemoveEmptyScriptsPlugin = require('webpack-remove-empty-scripts');
module.exports = {
entry: {
'styles': ['./styles.css']
},
plugins: [
new RemoveEmptyScriptsPlugin(),
new MiniCssExtractPlugin({
filename: '[name].[chunkhash:8].css',
})
],
module: {
rules: [
{
test: /\.css$/i,
use: [
MiniCssExtractPlugin.loader,
'css-loader'
],
},
],
},
};
webpack.config.js
const CssExtractPlugin = require('css-extract-plugin');
module.exports = {
entry: {
'styles': ['./styles.css']
},
plugins: [
new CssExtractPlugin({
filename: '[name].[chunkhash:8].css',
})
],
module: {
rules: [
{
test: /\.css$/i,
use: [
CssExtractPlugin.loader,
'css-loader'
],
},
],
},
};
The plugin css-extract-plugin
will do same as mini-css-extract-plugin
+ webpack-remove-empty-scripts
, but much faster.
FAQs
Extracts CSS into separate files and remove generated by webpack empty javascript files.
The npm package css-extract-plugin receives a total of 4 weekly downloads. As such, css-extract-plugin popularity was classified as not popular.
We found that css-extract-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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.