This package has been deprecated

Author message:

this module is no longer supported

@chialab/swc-plugin-htm
TypeScript icon, indicating that this package has built-in type declarations

0.12.2 • Public • Published

SWC Plugin HTM • A swc plugin for htm literals transpiling. Highly inspired by its babel counterpart babel-plugin-htm.

NPM

⚠️ The development of this plugin has been suspended for maintenance reasons after an initial trial period. Developments will follow when the swc project will be more stable.


Install

$ npm i @chialab/swc-plugin-html -D
$ yarn add @chialab/swc-plugin-html -D

Usage

import swc from '@swc/core';
import { plugin as htmPlugin } from '@chialab/swc-plugin-htm';

swc
    .transform("source code", {
        plugin: htmPlugin({ tag: 'html', pragma: 'h' }),
    })
    .then((output) => {
        output.code; // transformed code
        output.map; // source map (in string)
    });

License

SWC Plugin HTM is released under the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i @chialab/swc-plugin-htm

Weekly Downloads

2

Version

0.12.2

License

MIT

Unpacked Size

9.8 kB

Total Files

6

Last publish

Collaborators

  • chialab-admin
  • chialab-developers