rollup-plugin-string-html
v1.0.0
Published
Converts html files to modules
Downloads
30
Maintainers
Readme
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