rollup-plugin-html2

4.0.0 • Public • Published

rollup-plugin-html2

Rollup plugin to inject bundled files to an HTML template.

This plugin was inspired by the html-webpack-plugin and rollup-plugin-bundle-html.

rollup-plugin-html2 doesn't list the output directory but gets entries from the resulting bundle. Also it emits resulting HTML file as an asset so it could be accessed by other plugins.

The plugin can be used alongside the rollup-plugin-favicons. In this case rollup-plugin-favicons should be placed before rollup-plugin-html2 in the plugin list.

Install

npm i -D rollup-plugin-html2

Usage

// rollup.config.js

import html2 from 'rollup-plugin-html2'


export default {
  input: 'index.js',
  output: {
    dir: 'dist',
    format: 'es',
  },
  plugins: [
    html2({
      template: 'index.html',
    }),
  ],
}

Options

Read the documentation.

License

MIT © Petr Tsymbarovich

Readme

Keywords

Package Sidebar

Install

npm i rollup-plugin-html2

Weekly Downloads

137

Version

4.0.0

License

MIT

Unpacked Size

40.6 kB

Total Files

11

Last publish

Collaborators

  • mentaljam