@goldinteractive/ignore-assets-webpack-plugin

Ignore assets from compilation. Useful when you use non-js files as entry points with extract-text-webpack-plugin, and don't need the resulting empty js files.

Stats

StarsIssuesVersionUpdatedCreatedSize
@goldinteractive/ignore-assets-webpack-plugin
703.0.03 years ago3 years agoMinified + gzip package size for @goldinteractive/ignore-assets-webpack-plugin in KB

Readme

ignore-assets-webpack-plugin

Build Status npm version dependencies Status peerDependencies Status Coverage Status

peerDependencies

webpack >=2.2.0

Installation

$ npm i -D ignore-assets-webpack-plugin

Usage

/* ES6 */
import IgnoreAssetsWebpackPlugin from 'ignore-assets-webpack-plugin';

/* ES5 - CommonJS */
var IgnoreAssetsWebpackPlugin = require('ignore-assets-webpack-plugin');


webpack({
            entry: 'src/test.css',
            output: {
                filename: '[name]-dist.js'
            },
            module: {
                rules: [
                    {
                        test: /\.css$/,
                        use: ExtractTextWebpackPlugin.extract({
                            fallback: 'style-loader',
                            use: [
                                {
                                    loader: 'css-loader'
                                }
                            ]
                        })
                    }
                ]
            },
            plugins: [
                new ExtractTextWebpackPlugin('[name]-dist.css'),
                new IgnoreAssetsPlugin({
                    ignore: 'main-dist.js'
                })
            ]
        }

Options

ignore: (String | Array) List of assets to be ignored by webpack.

CONTRIBUTING

  • ⇄ Pull requests and ★ Stars are always welcome.
  • For bugs and feature requests, please create an issue.
  • Pull requests must be accompanied by passing automated tests ($ npm test).

CHANGELOG

LICENSE

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.