Skip to content

Commit

Permalink
Add to README
Browse files Browse the repository at this point in the history
  • Loading branch information
bensaufley committed Nov 21, 2023
1 parent 61c30bd commit a7d27a2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/plugin-jsx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,21 @@ npm install --save-dev @svgr/plugin-jsx
- Converting the [HAST](https://github.com/syntax-tree/hast) into a [Babel AST](https://github.com/babel/babel/blob/master/packages/babel-parser/ast/spec.md)
- Applying [`@svgr/babel-preset`](../babel-preset/README.md) transformations

## Skipping attribute transformations

For non-React implementations such as Preact, you can pass `false` to `jsx.transformAttributes`
and attributes will remain in their original form. If `jsx.transformAttributes` is `true` (the
default value), attributes will be transformed to their React equivalents—usually camelCase.
```js
// .svgrrc.js

module.exports = {
jsx: {
transformAttributes: false,
},
}
```

## Applying custom transformations

You can extend the Babel config applied in this plugin using `jsx.babelConfig` config path:
Expand Down

0 comments on commit a7d27a2

Please sign in to comment.