1.0.6 • Published 5 years ago

html-webpack-extra-tags-plugin v1.0.6

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

npm Build Status

  npm i --save-dev html-webpack-extra-tags-plugin
  yarn add --dev html-webpack-extra-tags-plugin

webpack.config.js

const HtmlWebpackPlugin = require('html-webpack-plugin')
const HtmlWebpackExtraTagsPlugin = require('html-webpack-extra-tags-plugin')

module.exports = {
  entry: 'index.js',
  output: {
    path: __dirname + '/dist',
    filename: 'bundle.js'
  },
  plugins: [
    new HtmlWebpackPlugin(),
    new HtmlWebpackExtraTagsPlugin(),
  ]
}

This will generate a file dist/webpack-css.html,webpack-js.html containing the following

    <link href="xxx.css"></link>
    <script src="bundle.js"></script>
NameTypeDefaultDescription
outputPath{String}./set output path

eg:

{
  entry: 'index.js',
  output: {
    path: __dirname + '/dist',
    filename: 'index_bundle.js'
  },
  plugins: [
    new HtmlWebpackPlugin(),
    new HtmlWebpackExtraTagsPlugin({ outputPath: path.resolve(__dirname, 'xxxx') }),
  ]
}
1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago