Security News
NVD Backlog Tops 20,000 CVEs Awaiting Analysis as NIST Prepares System Updates
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
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
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
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.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.