{"library":"rollup-plugin-svgr","title":"Rollup Plugin SVGR","description":"Rollup plugin that converts SVG files into React components using SVGR, without SVGO optimization or Babel transformation. Version 4.0.1 runs on Node >=20.9.0. Regularly updated with semver releases. Unlike other SVGR integrations, this plugin intentionally omits SVGO and Babel, reducing bundle size and build complexity for projects that handle optimization elsewhere. It supports a custom transform option instead of the removed babel option.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-plugin-svgr"],"cli":null},"imports":["import svgr from 'rollup-plugin-svgr'","const svgr = require('rollup-plugin-svgr').default","svgr({ include: '**/*.svg', exclude: 'node_modules/**', svgrOptions: { icon: true } })"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import svgr from 'rollup-plugin-svgr';\n\nexport default {\n  input: 'src/index.js',\n  output: { dir: 'dist', format: 'esm' },\n  plugins: [\n    svgr({\n      include: '**/*.svg',\n      svgrOptions: {\n        icon: true,\n        svgo: false,\n        titleProp: true,\n      },\n      transform: (code, id) => {\n        // optional custom transform, replaces old babel option\n        return code.replace('export default', 'export const MySvg =');\n      },\n    }),\n  ],\n};\n","lang":"javascript","description":"Shows basic setup of rollup-plugin-svgr with include/exclude, SVGR options, and custom transform function.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}