All Projects → yeiniel → babel-plugin-transform-html-import-to-string

yeiniel / babel-plugin-transform-html-import-to-string

Licence: MIT License
Turn HTML imports (and export from) into constant strings

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to babel-plugin-transform-html-import-to-string

core-web
like core-js but for Web APIs (based on polyfill.io)
Stars: ✭ 34 (+54.55%)
Mutual labels:  babel, babel-plugin
Param.macro
Partial application syntax and lambda parameters for JavaScript, inspired by Scala's `_` & Kotlin's `it`
Stars: ✭ 170 (+672.73%)
Mutual labels:  babel, babel-plugin
Babel Plugin Polished
Compile polished helper functions at build time
Stars: ✭ 133 (+504.55%)
Mutual labels:  babel, babel-plugin
Babel Plugin Prismjs
A babel plugin to use PrismJS with standard bundlers.
Stars: ✭ 114 (+418.18%)
Mutual labels:  babel, babel-plugin
babel-plugin-source-map-support
A Babel plugin which automatically makes stack traces source-map aware
Stars: ✭ 41 (+86.36%)
Mutual labels:  babel, babel-plugin
Babel Plugin Runtyper
⚡️ Runtime type-checker for JavaScript
Stars: ✭ 117 (+431.82%)
Mutual labels:  babel, babel-plugin
Babel Plugin React Html Attrs
Babel plugin which transforms HTML and SVG attributes on JSX host elements into React-compatible attributes
Stars: ✭ 170 (+672.73%)
Mutual labels:  babel, babel-plugin
Jsx Control Statements
Neater If and For for React JSX
Stars: ✭ 1,305 (+5831.82%)
Mutual labels:  babel, babel-plugin
Eslint Import Resolver Babel Module
Custom eslint resolve for babel-plugin-module-resolver
Stars: ✭ 236 (+972.73%)
Mutual labels:  babel, babel-plugin
Babel Plugin React Intl Auto
i18n for the component age. Auto management react-intl ID.
Stars: ✭ 203 (+822.73%)
Mutual labels:  babel, babel-plugin
Js Proposal Algebraic Effects
📐Let there be algebraic effects in JS
Stars: ✭ 110 (+400%)
Mutual labels:  babel, babel-plugin
S2s
Coding time Compile. A tool to write code fastest.
Stars: ✭ 254 (+1054.55%)
Mutual labels:  babel, babel-plugin
Babel Plugin Jsx Adopt
Stars: ✭ 94 (+327.27%)
Mutual labels:  babel, babel-plugin
babel-plugin-transform-replace-expressions
A Babel plugin for replacing expressions with other expressions
Stars: ✭ 23 (+4.55%)
Mutual labels:  babel, babel-plugin
Babel Plugin React Persist
Automatically useCallback() & useMemo(); memoize inline functions
Stars: ✭ 91 (+313.64%)
Mutual labels:  babel, babel-plugin
Babel Plugin Transform Typescript Metadata
Babel plugin to emit decorator metadata like typescript compiler
Stars: ✭ 142 (+545.45%)
Mutual labels:  babel, babel-plugin
Generator Babel Plugin
Babel Plugin generator for Yeoman
Stars: ✭ 88 (+300%)
Mutual labels:  babel, babel-plugin
Idx.macro
a 'babel-macros' version of 'babel-plugin-idx'
Stars: ✭ 90 (+309.09%)
Mutual labels:  babel, babel-plugin
Babel Plugin Macros
🎣 Allows you to build simple compile-time libraries
Stars: ✭ 2,366 (+10654.55%)
Mutual labels:  babel, babel-plugin
Xwind
Tailwind CSS as a templating language in JS and CSS-in-JS
Stars: ✭ 249 (+1031.82%)
Mutual labels:  babel, babel-plugin

babel-plugin-transform-html-import-to-string

Build Status

Turn HTML imports (and export from) into strings.

Example

Given the following example.html.

<h1>Hello</h1>

in

import html from './example.html';

out

const html = '<h1>Hello</h1>';

and if using export

in

export * as html from './example.html';

out

const html = "<h1>Hello</h1>";
export { html };

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