Skip to content
On this page

babelPluginJsxToStrve

babel-plugin-jsx-to-strve is a babel plugin that converts JSX for use with Strve tag template.

Install

npm install babel-plugin-jsx-to-strve

TIP

CreateStrveApp The project scaffolding tool has been installed by default. Select the strve-jsx or strve-jsx-apps template.

Usage

In your Babel configuration (.babelrc, babel.config.js, babel field in package.json, etc.), add the plugin:

{
  "plugins": [
    ["babel-plugin-jsx-to-strve"]
  ]
}

Options

tag=html

By default, babel-plugin-jsx-to-strve will handle all functions tagged with the name html markup template. To use a different name, use the tag option in the Babel configuration:

{"plugins":[
  ["babel-plugin-jsx-to-strve", {
    "tag": "html"
  }]
]}

Released under the MIT License.