Package Exports
- htmllinter-webpack-plugin
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (htmllinter-webpack-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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: {
...
}
}
}),
],
};