Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/medfreeman/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.
https://github.com/medfreeman/ignore-assets-webpack-plugin
assets files ignore webpack webpack-plugin webpack2
Last synced: 2 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/medfreeman/ignore-assets-webpack-plugin
- Owner: medfreeman
- License: gpl-3.0
- Created: 2017-02-06T15:08:12.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-15T08:12:32.000Z (over 6 years ago)
- Last Synced: 2024-10-09T13:46:05.640Z (3 months ago)
- Topics: assets, files, ignore, webpack, webpack-plugin, webpack2
- Language: JavaScript
- Homepage:
- Size: 22.5 KB
- Stars: 6
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ignore-assets-webpack-plugin
[![Build Status](https://img.shields.io/travis/medfreeman/ignore-assets-webpack-plugin.svg?label=build)](https://travis-ci.org/medfreeman/ignore-assets-webpack-plugin)
[![npm version](https://img.shields.io/npm/v/ignore-assets-webpack-plugin.svg)](https://www.npmjs.com/package/ignore-assets-webpack-plugin)
[![dependencies Status](https://img.shields.io/david/medfreeman/ignore-assets-webpack-plugin.svg)](https://david-dm.org/medfreeman/ignore-assets-webpack-plugin)
[![peerDependencies Status](https://img.shields.io/david/peer/medfreeman/ignore-assets-webpack-plugin.svg)](https://david-dm.org/medfreeman/ignore-assets-webpack-plugin?type=peer)
[![Coverage Status](https://img.shields.io/coveralls/medfreeman/ignore-assets-webpack-plugin/master.svg)](https://coveralls.io/github/medfreeman/ignore-assets-webpack-plugin?branch=master)## peerDependencies
webpack >=2.2.0
## Installation
```console
$ 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](CHANGELOG.md)
## [LICENSE](LICENSE)