Rollup Plugin
The Rollup plugin provides JSX transformation for HellaJS with fine-grained bundling control and optimal tree-shaking capabilities.
Installation
npm install --save-dev rollup-plugin-hellajs
Configuration
Add the plugin to your rollup.config.js.
import rollupHellaJS from 'rollup-plugin-hellajs';
export default {
input: 'src/main.jsx',
output: {
file: 'dist/bundle.js',
format: 'es'
},
plugins: [
rollupHellaJS()
]
};
TypeScript
The plugin includes built-in TypeScript support. No additional configuration is needed beyond ensuring your tsconfig.json is properly configured.
{
"compilerOptions": {
"jsx": "preserve",
"types": ["@hellajs/dom"] // Important
}
}