Skip to content

creage/babel-plugin-transform-minify-html-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

babel-plugin-transform-minify-html-template

A plugin for Babel 7 that removes whitespace and minifies html written using template strings

Installation

$ npm install babel-plugin-transform-minify-html-template --save-dev
$ babel --plugins babel-plugin-transform-minify-html-template script.js

Usage

All template strings tagged with the html tag will be minified and all unneeded white-space will be removed.

For instance:

let html = html`
	<div>
		<section class="awesome">hi there!</section>
	</div>
`;

becomes:

var html = "<div><section class=\"awesome\">hi there!<\/section><\/div>"

License

Copyright (c) 2018 Aziz Gazanchiian. Released under the MIT license.

About

A plugin for Babel 7 that removes whitespace and minifies html written using template strings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published