html-webpack-event-plugin

0.2.0 • Public • Published

html-webpack-event-plugin

npm version license

the events of html-webpack-plugin

Async:

  • html-webpack-plugin-before-html-generation
  • html-webpack-plugin-before-html-processing
  • html-webpack-plugin-alter-asset-tags
  • html-webpack-plugin-after-html-processing
  • html-webpack-plugin-after-emit

Sync:

  • html-webpack-plugin-alter-chunks

Installation

npm install --save-dev html-webpack-event-plugin

Usage

Even if you generate multiple files make sure that you add the HtmlWebpackEventPlugin only once.

var HtmlWebpackPlugin = require('html-webpack-plugin');
var HtmlWebpackEventPlugin = require('html-webpack-event-plugin');

plugins: [
  new HtmlWebpackEventPlugin(),
  new HtmlWebpackPlugin(),
  new HtmlWebpackPlugin({
    alterChunks: function (htmlPluginData, chunks) {
      return chunks;
    },
    beforeHtmlGeneration: function (htmlPluginData) {
      return htmlPluginData;
    },
    beforeHtmlProcessing: function (htmlPluginData) {
      return htmlPluginData;
    },
    alterAssetTags: function (htmlPluginData) {
      return htmlPluginData;
    },
    afterHtmlProcessing: function (htmlPluginData) {
      return htmlPluginData;
    },
    afterEmit: function (htmlPluginData) {
      return htmlPluginData;
    }
  })
]

License

This project is licensed under MIT.

Package Sidebar

Install

npm i html-webpack-event-plugin

Weekly Downloads

2

Version

0.2.0

License

MIT

Unpacked Size

9.4 kB

Total Files

4

Last publish

Collaborators

  • pfdnpm