jsx-trim
v0.1.2
Published
Clean up your html by trimming consecutive whitespaces in classnames.
Downloads
4
Maintainers
Readme
WARNING: In development, not tested in production. You should probably wait for the first major version.
JSX trim
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.
Support us
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.
Installation
npm install jsx-trim
yarn add jsx-trim
Usage
Babel
Add the plugin to your babel config
[
"@babel/plugin-transform-react-jsx",
{ runtime: 'automatic', importSource: 'jsx-trim' }
]
vite:
With @vitejs/plugin-react
installation is just one line.
export default defineConfig(() => ({
plugins: [
react({
jsxImportSource: 'jsx-trim'
})
]
}));
Changelog
Please see releases for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you've found a bug regarding security please mail [email protected] instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.