datalad-course/node_modules/babel-plugin-transform-html-import-to-string
2025-03-21 15:28:44 +01:00
..
.idea A new start for all of Adina's DataLad Course talks - properly annexed 2025-03-21 15:28:44 +01:00
lib A new start for all of Adina's DataLad Course talks - properly annexed 2025-03-21 15:28:44 +01:00
src A new start for all of Adina's DataLad Course talks - properly annexed 2025-03-21 15:28:44 +01:00
.babelrc A new start for all of Adina's DataLad Course talks - properly annexed 2025-03-21 15:28:44 +01:00
.npmignore A new start for all of Adina's DataLad Course talks - properly annexed 2025-03-21 15:28:44 +01:00
package.json A new start for all of Adina's DataLad Course talks - properly annexed 2025-03-21 15:28:44 +01:00
README.md A new start for all of Adina's DataLad Course talks - properly annexed 2025-03-21 15:28:44 +01:00

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

.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"]
});