Socket
Book a DemoInstallSign in
Socket

html-webpack-plugin-addons

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-webpack-plugin-addons

Addons for the html-webpack-plugin to alter the html in your webpack config.

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

html-webpack-plugin-addons

NPM

Addons for the html-webpack-plugin to alter the html in your webpack config.

Installation

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

Usage

var HtmlWebpackPlugin = require('html-webpack-plugin');
var HtmlWebpackPluginAddons = require('html-webpack-plugin-addons');

var webpackConfig = {
    entry: 'index.js',
    output: {
        path: 'dist',
        filename: 'bundle.js'
    },
    plugins: [
        new HtmlWebpackPlugin(),
        // Events (https://github.com/ampedandwired/html-webpack-plugin#events)
        new HtmlWebpackPluginAddons({
            beforeHTMLGeneration: function(pluginData, next) {
                // html-webpack-plugin-before-html-generation
                next(null, pluginData);
            },
            beforeHTMLProcessing: function(pluginData, next) {
                // html-webpack-plugin-before-html-processing
                next(null, pluginData);
            },
            alterAssetTags: function(pluginData, next) {
                // html-webpack-plugin-alter-asset-tags
                next(null, pluginData);
            },
            afterHTMLProcessing: function(pluginData, next) {
                // html-webpack-plugin-after-html-processing
                next(null, pluginData);
            },
            afterEmit: function(pluginData, next) {
                // html-webpack-plugin-after-emit
                next(null, pluginData);
            }
        })
    ]
};

module.exports = webpackConfig;

License

This project is licensed under MIT.

Keywords

html

FAQs

Package last updated on 08 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts