Skip to content

ZimNovich/rollup-plugin-mxn-jsx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rollup-plugin-mxn-jsx

Rollup JSX plugin that transpiles JSX into JavaScript

  • ~6.1kb size
  • ~2.5kb minified + gzipped

This is a wrapper around mxn-jsx-ast-transformer. Make sure to go check that out for options.

Install

$ npm install rollup-plugin-mxn-jsx

Usage

Use it like this in your rollup.config:

import rollupMxnJsx from "rollup-plugin-mxn-jsx";

export default {
	input: "src/index.js",
	external: [
		"preact",
		"prop-types"
	],
	output: {
		file: "bundle/bundle.js",
		format: "iife",
		name: "App",
		sourcemap: false,
		globals: {
			"preact": "preact",
			"prop-types": "PropTypes"
		}
	},
	plugins: [
		rollupMxnJsx({
			factory: "h",
			include: ["*.js", "*.jsx"]
		})
	]
};

License

This module is released under the MIT license.

Related

About

Rollup JSX plugin that transpiles JSX into JavaScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published