0.0.4 • Published 8 years ago

html-append-plugin v0.0.4

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

html-append-plugin

Install

$ npm install html-append-plugin -D

Usage

The plugin will append content to html files duration compilation

var HtmlWebpackPlugin = require('html-webpack-plugin');
var htmlAppendPlugin = require('html-append-plugin');
var webpackConfig = {
  entry: 'index.js',
  output: {
    path: 'dist',
    filename: 'bundle.js'
  },
  plugins: [
    new HtmlWebpackPlugin(),
    new htmlAppendPlugin({
      append: 'added content'
      // or
      // append: function(){
      //   return 'added content';
      // }
    })
  ]
}

This will generate a file dist/index.html containing the following content:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Webpack App</title>
  </head>
  <body>
    <script src="bundle.js"></script>
    added content
  </body>
</html>

License

MIT © fengzilong

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago