babel-plugin-react-hyperscript-require
Babel plugin that adds react-hyperscript import declaration
(this repo was cloned from styled-components-require and modified to be used with react-hyperscript)
Example
Your component.js
that contains this code:
const Component = ;;
will be transpiled to:
; const Component = ;;
Usage
npm install babel-plugin-react-hyperscript-require --save-dev
Add react-hyperscript-require
into .babelrc
Tests
â add import statement if h()
is present
â do not add when no h in use
â do not add import react-hyperscript twice
â do not add if it already imported
You like?
⭐️ this repo
License
MIT © mciparelli