cheerio-webpack-plugin

0.1.2 • Public • Published

Cheerio Webpack Plugin

Instllation

$ npm install cheerio-webpack-plugin

Usage

const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const CheerioWebpackPlugin = require('cheerio-webpack-plugin')
 
module.exports = {
  entry: './src/index.js',
 
  output: {
    filename: 'bundle.js',
    path: path.resolve(__dirname, './dist')
  },
 
  plugins: [
    new HtmlWebpackPlugin({
      filename: 'index.html',
      template: './src/index.html'
    }),
    new CheerioWebpackPlugin({
      test: /.html$/,
      callback: function ($) {
        $('link').remove()
      }
    })
  ]
}
 

License

The MIT License

Package Sidebar

Install

npm i cheerio-webpack-plugin

Weekly Downloads

0

Version

0.1.2

License

MIT

Unpacked Size

5.02 kB

Total Files

9

Last publish

Collaborators

  • f2