Babel Plugin
The Babel plugin transforms HellaJS JSX syntax into JavaScript objects that can be rendered by the HellaJS runtime.
Installation
Section titled “Installation”npm install --save-dev babel-plugin-hellajs
Basic Configuration
Section titled “Basic Configuration”Add the plugin to your babel.config.js
:
module.exports = { plugins: [ 'babel-plugin-hellajs' ]};
TypeScript Support
Section titled “TypeScript Support”For TypeScript projects, combine with the TypeScript preset:
module.exports = { presets: ['@babel/preset-typescript'], plugins: ['babel-plugin-hellajs']};
Ensure your tsconfig.json
includes:
{ "compilerOptions": { "jsx": "preserve", "types": [ "@hellajs/dom" ], }}