1.0.0 • Published 5 years ago

rollup-plugin-string-html v1.0.0

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

forked from rollup-plugin-string

Converts html files to modules:

import tpl from "./tpl.html";
console.log(`Template for render: ${tpl}`);

Installation

yarn add rollup-plugin-string-html

Usage

import { rollup } from "rollup";
import html from "rollup-plugin-string-html";

rollup({
  entry: "main.js",
  plugins: [
    string({
      include: ["**/*.html"], // default
      exclude: ["**/index.html"],
      minifier: { // opts of html-minifier
          ...
      }
    })
  ]
});

Minifier

The options of html-minifier

default

collapseWhitespace: true,
removeComments: true,
removeEmptyAttributes: true,
minifyCSS: true,
minifyJS: true,

License

MIT © hahappy