@bundl/jsx

JSX plugin for Bundl

Usage no npm install needed!

<script type="module">
  import bundlJsx from 'https://cdn.skypack.dev/@bundl/jsx';
</script>

README

@bundl/jsx

JSX Plugin for Bundl.

Note that it doesn't compile using Babel. For Babel use this plugin.

Installation

# npm
npm i -D @bundl/jsx
# yarn
yarn add -D @bundl/jsx

Usage

const jsx = require('@bundl/jsx')

module.exports = {
  output: {
    'build/bundle.js': {
      use: jsx(),
      input: 'src/*.js'
    }
  }
}

Custom JSX factory

This plugin uses jsx-transform so all options are inherited from it.

const jsx = require('@bundl/jsx')

module.exports = {
  output: {
    'build/bundle.js': {
      use: jsx({ factory: 'preact.h' }),
      input: 'src/*.js'
    }
  }
}