rollup-plugin-string-html

1.0.0 • Public • Published

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

/rollup-plugin-string-html/

    Package Sidebar

    Install

    npm i rollup-plugin-string-html

    Weekly Downloads

    13

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    3.63 kB

    Total Files

    5

    Last publish

    Collaborators

    • hyhappy