Files
react-native-devtools-frontend/node_modules/rollup-plugin-minify-html-template-literals
Jan Scheffler 551be57016 Update puppeteer to v10.0.0
DISABLE_THIRD_PARTY_CHECK=Update puppeteer requires type changes

Bug: None
Change-Id: Ifda85d161fc94567e4cfaaab0acc2da2f2c29d30
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2953266
Auto-Submit: Jan Scheffler <janscheffler@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-06-11 09:22:36 +00:00
..
2021-06-11 09:22:36 +00:00

rollup-plugin-minify-html-template-literals

Minifies HTML template literal strings

npm Travis CI David License

Uses minify-html-literals to minify HTML and CSS markup inside JavaScript template literal strings.

This plugin supports Rollup v2.

Install

npm install --save-dev rollup-plugin-minify-html-template-literals

Usage

import minifyHTML from 'rollup-plugin-minify-html-template-literals'
import babel from '@rollup/plugin-babel'
import { terser } from 'rollup-plugin-terser'

export default {
  input: 'index.js',
  output: { file: 'dist/index.js' },
  plugins: [
    minifyHTML(),
    // Order this plugin before other transpilers and minifiers
    babel(),
    terser()
  ]
}

By default, this will minify any tagged template literal string whose tag contains "html" or "css" (case insensitive). Additional options may be specified to control what templates should be minified.

Options

declare const pluginOptions {
  /**
  * A picomatch pattern, or array of patterns, which specifies the files in the build the plugin should operate on.
  */
  include?: ReadonlyArray<string | RegExp> | string | RegExp | null
  /**
  * A picomatch pattern, or array of patterns, which specifies the files in the build the plugin should ignore.
  */
  exclude?: typeof pluginOptions.include
  /**
  * Minify options, see https://www.npmjs.com/package/minify-html-literals#options.
  */
  options?: DefaultOptions
}

License

MIT

Donate

Buy Me A Coffee