Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
ignore-emit-webpack-plugin
Advanced tools
Prevents ignored files from being emitted during a Webpack build
Prevent files that are matching a pattern from being emitted in a webpack build. This is achieved with a webpack plugin.
You can easily ignore file by accident - use with care.
npm i --save-dev ignore-emit-webpack-plugin
Typescript
// webpack.config.js
import IgnoreEmitPlugin from 'ignore-emit-webpack-plugin';
export default {
// ...
plugins: [
new IgnoreEmitPlugin(/\.map$/)
]
};
JS
// webpack.config.js
const IgnoreEmitPlugin = require('ignore-emit-webpack-plugin');
module.exports = {
// ...
plugins: [ new IgnoreEmitPlugin(/\.map$/) ]
// ...
};
The module is written in Node 8.x flavored es6.
To get the es5 transpiled version use require('ignore-emit-webpack-plugin/es5')
Signature: new IgnoreEmitPlugin(patterns, options)
{RegExp|string|Array.<RegExp|string>}
- regex, string or array with mixed regex/strings (deep nesting allowed),
to match against the OUTPUT path of assets.{object}
- optional, options object
{boolean}
- prints extra logsnot defining patterns or defining invalid pattern will throw error.
// single regex
new IgnoreEmitPlugin(/\/artifacy.js$/);
// single regex in array
new IgnoreEmitPlugin([ /\/artifacy.js$/ ]);
// mixed array
new IgnoreEmitPlugin([ 'file.woff', /\/artifacy.js$/ ]);
// you can also do this - but you really shouldn't
new IgnoreEmitPlugin([ [ [ [ /\/artifacy.js$/ ] ] ] ]);
// file.js
// dir/file.js
new IgnoreEmitPlugin('file.js'); // both file.js and dir/file.js ignored
new IgnoreEmitPlugin(/\/file\.js/); // only dir/file.js is ignored
new IgnoreEmitPlugin(/^file\.js/); // only file.js is ignored
Contribution would be much appreciated. Either by creating pull requests of opening issues.
FAQs
Prevents ignored files from being emitted during a Webpack build
The npm package ignore-emit-webpack-plugin receives a total of 25,943 weekly downloads. As such, ignore-emit-webpack-plugin popularity was classified as popular.
We found that ignore-emit-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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.