| .. | ||
| .idea | ||
| lib | ||
| src | ||
| .babelrc | ||
| .npmignore | ||
| package.json | ||
| README.md | ||
babel-plugin-transform-html-import-to-string
Turn HTML imports into strings.
Example
Given the following example.html.
<h1>Hello</h1>
in
import html from './example.html';
out
var html = '<h1>Hello</h1>';
Installation
$ npm install babel-plugin-transform-html-import-to-string
Usage
Via .babelrc (Recommended)
.babelrc
{
"plugins": ["transform-html-import-to-string"]
}
Via CLI
$ babel --plugins transform-html-import-to-string script.js
Via Node API
require("babel-core").transform("code", {
plugins: ["transform-html-import-to-string"]
});