Skip to content

Babel Plugin

The Babel plugin transforms HellaJS JSX syntax into JavaScript objects that can be rendered by the HellaJS runtime.

Terminal window
npm install --save-dev babel-plugin-hellajs

Add the plugin to your babel.config.js:

module.exports = {
plugins: [
'babel-plugin-hellajs'
]
};

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"
],
}
}