![The Risks of Misguided Research in Supply Chain Security](https://cdn.sanity.io/images/cgdhsj6q/production/8d0ef109a68b4c819a3f2689a05769bebace4f19-1072x539.png?w=400&fit=max&auto=format)
Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
webpack-exclude-assets-plugin
Advanced tools
Webpack plugin to exclude assets from webpack output based on a path RegExp pattern.
When we have css, scss, sss, stylus or some style file as an entry for example, using some plugin to extract chunck as a separeted file as mini-css-extract-plugin
or extract-text-webpack-plugin
, Webpack give us as a output a js file with some empty functions. I think that's files does'nt matter for us, so this plugin removes it. :)
// webpack.config.js
const path = require('path');
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const ExcludeAssetsPlugin = require("webpack-exclude-assets-plugin");
module.exports = {
entry: { ... },
output: {
path: path.join(__dirname, 'dist'),
filename: 'js/[name].js'
},
plugins: [
new MiniCssExtractPlugin({
filename: "[name].css"
}),
new ExcludeAssetsPlugin({
// path: string | [string]
path: [
'^js\/css\/.*\.js$',
'^.*(?=!(foo)).+some[cool]RegExpHere$'
]
})
],
module: { ... },
resolve: { ... }
};
// webpack.config.js
const path = require('path');
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const ExcludeAssetsPlugin = require("webpack-exclude-assets-plugin");
module.exports = {
entry: {
app: path.resolve(__dirname, 'js/app.js'),
"css/app": path.resolve(__dirname, 'css/app.css')
},
output: {
path: path.join(__dirname, 'dist'),
filename: 'js/[name].js'
},
plugins: [
new MiniCssExtractPlugin({
filename: "[name].css"
}),
new ExcludeAssetsPlugin({
path: ['^js\/css\/.*\.js$']
})
],
module: {
rules: [
{
test: /\.css$/,
exclude: /node_modules/,
use: [
MiniCssExtractPlugin.loader,
'css-loader',
]
}
]
},
resolve: {
extensions: ['.css']
}
};
webpack-exclude-assets-plugin
:.
├── css
│ └── app.css
└── js
├── app.js
└── css
└── app.js
3 directories, 3 files
webpack-exclude-assets-plugin
:.
├── css
│ └── app.css
└── js
└── app.js
2 directories, 2 files
FAQs
Plugin to exclude assets from webpack output
The npm package webpack-exclude-assets-plugin receives a total of 3,898 weekly downloads. As such, webpack-exclude-assets-plugin popularity was classified as popular.
We found that webpack-exclude-assets-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.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.