MCPcopy Index your code
hub / github.com/bdadam/rollup-plugin-html

github.com/bdadam/rollup-plugin-html @v0.2.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.1 ↗ · + Follow
3 symbols 7 edges 4 files 0 documented · 0% 5 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

rollup-plugin-html Build Status

Rollup plugin for loading content of HTML files to use as string variable in JavaScript code.

Installation

npm install --save-dev rollup-plugin-html

Usage

import { rollup } from 'rollup';
import html from 'rollup-plugin-html';

rollup({
    entry: 'main.js',
    plugins: [
        html({
            include: '**/*.html'
        })
    ]
}).then(...)

Options

include

Type: array or string
Default: **/*.html

A single file pattern, or an array of file patterns to include when importing html files. For more details see rollup-pluginutils.

exclude

Type: array or string
Default: undefined

A single file pattern, or an array of file patterns to exclude when importing html files. For more details see rollup-pluginutils.

htmlMinifierOptions

Type: Object Default: {}

The options which are given to html-minifier

E.g.:

rollup({
    entry: 'main.js',
    plugins: [
        html({
            include: '**/*.html',
            htmlMinifierOptions: {
                collapseWhitespace: true,
                collapseBooleanAttributes: true,
                conservativeCollapse: true,
                minifyJS: true
            }
        })
    ]
}).then(...)

License

MIT

Credits

Thanks for Bogdan Chadkin (@TrySound) for his rollup-plugin-string rollup plugin which I used as the basis for this plugin.

Core symbols most depended-on inside this repo

Shape

Function 3

Languages

TypeScript100%

Modules by API surface

index.js2 symbols
test/index.js1 symbols

For agents

$ claude mcp add rollup-plugin-html \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page