WARNING: In development, not tested in production. You should probably wait for the first major version.
Using multiline template strings to set jsx classnames?
You might have seen all the extra whitespace in your html output, which makes using the browser devtools a pain. Use this transformer to get rid of consecutive, leading and trailing whitespaces in classname attributes.
We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
npm install jsx-trim
yarn add jsx-trim
Add the plugin to your babel config
[
"@babel/plugin-transform-react-jsx",
{ runtime: 'automatic', importSource: 'jsx-trim' }
]
With @vitejs/plugin-react
installation is just one line.
export default defineConfig(() => ({
plugins: [
react({
jsxImportSource: 'jsx-trim'
})
]
}));
Please see releases for more information what has changed recently.
Please see CONTRIBUTING for details.
If you've found a bug regarding security please mail security@spatie.be instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.