htmllinter-webpack-plugin

0.2.1 • Public • Published

htmllinter-webpack-plugin

A webpack plugin to lint html file emitted in output folder. This plugin should be using with html-webpack-plugin which creates a template html file for your bundle

Install

Install it using

yarn add htmllinter-webpack-plugin --dev

Make sure you have html-webpack-plugin installed

Usage

in your webpack.config.js

const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmllinterWebpackPlugin = require('htmllinter-webpack-plugin');

module.exports = {
  ...
  plugins: [
    new HtmlWebpackPlugin(),
    new HtmllinterWebpackPlugin(options),
  ],
};

Options

config

It is config object for htmllinter. Refer this

Example

// webpack.config.js

module.exports = {
  ...
  plugins: [
    new HtmlWebpackPlugin(),
    new HtmllinterWebpackPlugin({
      config:{
        extend: require('@htmllinter/basic-config'),
        rules: {
          ...
        }
      }
    }),
  ],
};

Package Sidebar

Install

npm i htmllinter-webpack-plugin

Weekly Downloads

4

Version

0.2.1

License

none

Unpacked Size

9.92 kB

Total Files

6

Last publish

Collaborators

  • anixsaha