All Projects → bdadam → rollup-plugin-html

bdadam / rollup-plugin-html

Licence: MIT license
Import HTML files as strings in rollup build

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to rollup-plugin-html

rollup-plugin-userscript-metablock
Transform json file to userscript metablock and append on.
Stars: ✭ 26 (-27.78%)
Mutual labels:  rollup, rollup-plugin
rollup-plugin-inject-process-env
Inject environment variables in process.env with Rollup
Stars: ✭ 48 (+33.33%)
Mutual labels:  rollup, rollup-plugin
rollup-plugin-sizes
Rollup plugin to display bundle contents & size information
Stars: ✭ 77 (+113.89%)
Mutual labels:  rollup, rollup-plugin
rollup-plugin-lit-css
Moved to https://github.com/bennypowers/lit-css
Stars: ✭ 35 (-2.78%)
Mutual labels:  rollup, rollup-plugin
rollup-plugin-purs
Bundles PureScript modules with Rollup
Stars: ✭ 71 (+97.22%)
Mutual labels:  rollup, rollup-plugin
rollup-plugin-external-globals
Transform external imports into global variables like output.globals.
Stars: ✭ 57 (+58.33%)
Mutual labels:  rollup, rollup-plugin
rollup-plugin-markdown
import JavaScript from Markdown code blocks
Stars: ✭ 16 (-55.56%)
Mutual labels:  rollup, rollup-plugin
web-config
A Rollup configuration to build modern web applications with sweet features as for example SCSS imports, Service Worker generation with Workbox, Karma testing, live reloading, coping resources, chunking, treeshaking, Typescript, license extraction, filesize visualizer, JSON import, budgets, build progress, minifying and compression with brotli a…
Stars: ✭ 17 (-52.78%)
Mutual labels:  rollup, rollup-plugin
rollup-plugin-closure-compiler-js
Rollup plugin for optimizing JavaScript with google-closure-compiler-js.
Stars: ✭ 31 (-13.89%)
Mutual labels:  rollup, rollup-plugin
rollup-plugin-tagged-template
Use plain HTML files as tagged templates.
Stars: ✭ 24 (-33.33%)
Mutual labels:  rollup, rollup-plugin
rollup-plugin-collect-sass
Collect Sass, then compile
Stars: ✭ 17 (-52.78%)
Mutual labels:  rollup, rollup-plugin
postcss-font-grabber
A postcss plugin, it grabs remote font files and update your CSS, just like that.
Stars: ✭ 26 (-27.78%)
Mutual labels:  rollup, rollup-plugin
rollup-plugin-jscc
Conditional compilation and compile-time variable replacement for Rollup
Stars: ✭ 52 (+44.44%)
Mutual labels:  rollup, rollup-plugin
rollup-plugin-generate-html-template
Rollup plugin for automatically injecting a script tag with the final bundle into an html file.
Stars: ✭ 58 (+61.11%)
Mutual labels:  rollup, rollup-plugin
rollup-plugin-generate-package-json
Generate package.json file with packages from your bundle using Rollup
Stars: ✭ 29 (-19.44%)
Mutual labels:  rollup, rollup-plugin
electron-vue-next
A starter template for using vue-next with the electron.
Stars: ✭ 189 (+425%)
Mutual labels:  rollup
svelte-box
A truffle box for svelte
Stars: ✭ 60 (+66.67%)
Mutual labels:  rollup
chunks-webpack-plugin
Create HTML files with entrypoints and chunks relations to serve your bundles
Stars: ✭ 22 (-38.89%)
Mutual labels:  html-files
zksync-dapp-checkout
zkCheckout — trustable permissionless DeFi payment gateway. Brand new zkSync dApp w/t all L2 perks: fast&cheap transfers / simple&quick withdrawal
Stars: ✭ 37 (+2.78%)
Mutual labels:  rollup
rollup-plugin-html-entry
Use HTML files as entry points in your rollup bundle.
Stars: ✭ 13 (-63.89%)
Mutual labels:  rollup-plugin

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].