8.1.0 • Published 2 years ago

@svgr/plugin-jsx v8.1.0

Weekly downloads
3,980,085
License
MIT
Repository
github
Last release
2 years ago

@svgr/plugin-jsx

Build Status Version MIT License

Transforms SVG into JSX.

Install

npm install --save-dev @svgr/plugin-jsx

Usage

.svgrrc

{
  "plugins": ["@svgr/plugin-jsx"]
}

How does it work?

@svgr/plugin-jsx consists in three phases:

Applying custom transformations

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

// .svgrrc.js

module.exports = {
  jsx: {
    babelConfig: {
      plugins: [
        // For an example, this plugin will remove "id" attribute from "svg" tag
        [
          '@svgr/babel-plugin-remove-jsx-attribute',
          {
            elements: ['svg'],
            attributes: ['id'],
          },
        ],
      ],
    },
  },
}

Several Babel plugins are available:

If you want to create your own, reading Babel Handbook is a good start!

License

MIT

@svgr/webpackparcel-plugin-svgr-patchedparcel-plugin-svgrsvg-library-component-creator@infinitebrahmanuniverse/nolb-_svplop-pack-gatsby-starter@everything-registry/sub-chunk-885@porosjs/bundler-webpackaelfd-designsvg-react-iconsvgr-rollup-infernosvgr-webpack-infernosvg2rnsvglbtest-my-designwsksvgsui-iconssun-iconsstickerbombsvg-component-library-creatorsvg-componentifysvg-to-icon-clivite-plugin-react-svgvite-plugin-react-rich-svgvite-plugin-svgr@camol/vite-plugin-react-svg@buttery/icons@benepass/icons@bendews/aws-react-icons@rsbuild/plugin-svgr@payping/icons@rntest/iconicongoicona-clilsicon@wfp/icons-core@twilio-labs/match-icons@twilio-labs/match-icons-twilio@twilio-labs/svg-to-react@umijs/bundler-webpack@un/icons-core@toba/svg-transformer@toba/build@voiceflow/vite-config@yipkos/parcel-plugin-inline-svg@yocdev/tarocodegen@zalastax/nolb-_sv@zalando-sunrise/backstage-cli@zag-js/anatomy-iconsastro-theme-mecure@clevercanyon/dev-deps@gravity-ui/app-builder@grexie/pages-image-loader@atlaspack/transformer-svg-react@atls/code-runtime@achmadk/vite-plugin-svgr@consta/stand@alshdavid/atlaspack@fotoz/react-components@stazg/ordiosymbol-sync@backstage/cli@blackplate/react-native-svg-processor@carforyou/assetsunplugin-svgr@lobatolobato/maptranspiler@lansforsakringar/icons@nexapp/vite-plugin-react-svg@next-languages/flags@modern-js/plugin-unbundle@modern-js/libuild-plugin-svgr@monstrs/tools-runtime@react-native-esbuild/plugins@react-spectrum/parcel-transformer-s2-icon@react-vector-graphics/core@proscom/gulp-svgr@promoboxx/react-scripts-vite@productboard/svg-componentify@progressiveui/icons-core@quple-pos/stand@redwoodjs/codemods@ponyui/assets-export-cli@parcel/transformer-svg-react@retil/tool-vite-plugin-svg@rndna/icon@roadiehq/roadie-climw-icons-testmulti-web-design-systemministaosp-uiparcel-plugin-svg-reactparcel-plugin-svgr-patched-v2rspack-svg-loaderrollup-plugin-svgrsane-iconsreact-icons-clireact-native-svg-transformernorma-dspicknplacepg-template-esbuild
8.1.0

2 years ago

8.0.1

2 years ago

8.0.0

2 years ago

7.0.0

3 years ago

6.5.0

3 years ago

6.4.0

3 years ago

6.5.1

3 years ago

6.3.0

3 years ago

6.3.1

3 years ago

6.2.1

4 years ago

6.2.0

4 years ago

6.0.0-alpha.3

4 years ago

6.0.0-alpha.4

4 years ago

6.1.0

4 years ago

6.0.0

4 years ago

6.1.2

4 years ago

6.0.0-alpha.2

4 years ago

6.0.0-alpha.1

4 years ago

6.0.0-alpha.0

4 years ago

5.5.0

5 years ago

5.4.0

5 years ago

5.3.1

6 years ago

5.3.0

6 years ago

5.2.0

6 years ago

5.0.1

6 years ago

5.0.0

6 years ago

4.3.3

6 years ago

4.3.2

6 years ago

4.3.1

6 years ago

4.3.0

6 years ago

4.2.0

7 years ago

4.1.0

7 years ago

4.0.3

7 years ago

4.0.2

7 years ago

4.0.1

7 years ago

4.0.0

7 years ago