All Projects → mrbar42 → ignore-emit-webpack-plugin

mrbar42 / ignore-emit-webpack-plugin

Licence: MIT License
Prevents ignored files from being emitted during a Webpack build

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to ignore-emit-webpack-plugin

Browser Sync Webpack Plugin
Easily use BrowserSync in your Webpack project.
Stars: ✭ 356 (+1994.12%)
Mutual labels:  webpack-plugin, webpack2
Webpack Core Usage
webpack2完整系列课程,欢迎阅读。同时欢迎移步我的react全家桶文章全集: https://github.com/liangklfangl/react-article-bucket
Stars: ✭ 94 (+452.94%)
Mutual labels:  webpack-plugin, webpack2
Webpack Cdn Plugin
A webpack plugin that use externals of CDN urls for production and local node_modules for development
Stars: ✭ 306 (+1700%)
Mutual labels:  webpack-plugin, webpack2
Everything Is A Plugin
Everything is a Plugin: Mastering webpack from the inside out. NgConf 2017
Stars: ✭ 123 (+623.53%)
Mutual labels:  webpack-plugin, webpack2
Html Res Webpack Plugin
plugin for generating html in webpack
Stars: ✭ 170 (+900%)
Mutual labels:  webpack-plugin, webpack2
prettier-eslint-webpack-plugin
Webpack plugin for prettier-eslint which ESLint's settings is set to JavaScript Standard Style
Stars: ✭ 24 (+41.18%)
Mutual labels:  webpack-plugin, webpack2
Webpack Alioss Plugin
阿里 oss-webpack 自动上传插件
Stars: ✭ 35 (+105.88%)
Mutual labels:  webpack-plugin, webpack2
Svg Sprite Loader
Webpack loader for creating SVG sprites.
Stars: ✭ 1,822 (+10617.65%)
Mutual labels:  webpack-plugin, webpack2
Multipage Webpack Plugin
A plugin that makes handling templates and asset distribution for multi-page applications using webpack trivial
Stars: ✭ 168 (+888.24%)
Mutual labels:  webpack-plugin, webpack2
bower-resolve-webpack-plugin
Offers an enhanced bower support for enhanced-resolve plugin.
Stars: ✭ 12 (-29.41%)
Mutual labels:  webpack-plugin, webpack2
tde-webpack-mjml-plugin
Webpack plugin for converting MJML files to HTML
Stars: ✭ 12 (-29.41%)
Mutual labels:  webpack-plugin, webpack2
react-redux-webpack-lazy-loading
The follow up example of react-webpack-lazy-loading now using Redux
Stars: ✭ 16 (-5.88%)
Mutual labels:  webpack2
prettier-webpack-plugin
Process your Webpack dependencies with Prettier
Stars: ✭ 47 (+176.47%)
Mutual labels:  webpack-plugin
jschr.io
The static website generator service behind jschr.io.
Stars: ✭ 70 (+311.76%)
Mutual labels:  webpack2
summary1
个人总结 持续更新 欢迎提出各种issues
Stars: ✭ 13 (-23.53%)
Mutual labels:  webpack2
modul-typescript-template
Template to start a new project with Modul / Vuejs / Typescript
Stars: ✭ 13 (-23.53%)
Mutual labels:  webpack2
webpack-aws-lambda
AWS Lambda that runs webpack and output the bundle.js file
Stars: ✭ 12 (-29.41%)
Mutual labels:  webpack2
cloudMusic
(移动端)Vue2.0+Nodejs网易云音乐,网易云音乐api强力驱动,高音质破解(持续更新中)
Stars: ✭ 14 (-17.65%)
Mutual labels:  webpack2
better-keyboard
A js keyboard component for mobile.
Stars: ✭ 55 (+223.53%)
Mutual labels:  webpack2
tinyimg-webpack-plugin
A webpack plugin for compressing image
Stars: ✭ 61 (+258.82%)
Mutual labels:  webpack-plugin

Ignore Emit Webpack plugin

Build Status

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.

Quick Usage

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')

Usage

Signature: new IgnoreEmitPlugin(patterns, options)

  • patterns {RegExp|string|Array.<RegExp|string>} - regex, string or array with mixed regex/strings (deep nesting allowed), to match against the OUTPUT path of assets.
  • options {object} - optional, options object
    • options.debug {boolean} - prints extra logs

not 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

I want to help!

Contribution would be much appreciated. Either by creating pull requests of opening issues.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].