Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

KnisterPeter/html-webpack-exclude-empty-assets-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HtmlWebpackExcludeEmptyAssetsPlugin

This will prevent the HtmlWebpackPlugin from adding empty assets into the html.

Usage

const HtmlWebpackExcludeEmptyAssetsPlugin = require('html-webpack-exclude-empty-assets-plugin');

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

All Configuration Options

The HtmlWebpackExcludeEmptyAssetsPlugin accepts an object of options with the following attributes:

new HtmlWebpackExcludeEmptyAssetsPlugin({,
  minBytes: 1024
})
  • minBytes - the minimum byte size a file has to meet to not be deleted. Defaults to 1024 bytes.