{"repo":"platypusrex/next-plugin-svgr","free":true,"listed":false,"github":"https://github.com/platypusrex/next-plugin-svgr","clone":"git clone https://github.com/platypusrex/next-plugin-svgr.git","description":"Next.js plugin for SVGR","language":"JavaScript","stars":39,"topics":["nextjs","webpack","svgr"],"license":"MIT","category":"saas-starters-boilerplates","readme_excerpt":"Next.js + SVGR Flexible Next.js plugin for transforming svg's into react components using the svgr library Installation npm or yarn Usage Create a next.config.js in your project Optionally add Next.js configuration as a parameter Or with next-compose-plugins when composing multiple plugins And now in your components you can use the svg as a component Options svgrOptions The plugins supports all available options of svgr webpack loader. Check out the svgr documentation for the full list of options. Example with options: You can optionally specify a project configuration file. SVGR uses cosmiconfig for configuration file support, which means that any file type accepted by cosmicconfig is supported. .svgrrc file, written in YAML or JSON, with optional extensions: .yaml/.yml/.json/.js. A svgr.config.js file that exports an object. A \"svgr\" key in your package.json file. note: The plugin will automatically detect your config file so you shouldn't have to include the configFile property in svgrOptions . The option to specify exists and can be accomplished following the example below. fileLoader If you would like to use the svgr webpack loader with file-loader. Accepts a boolean or all available options for file-loader. The fileLoader option is undefined by default. If defined, it will apply the options below. note: If using file-loader and typescript remember to reference the svgr/file-loader types. See below. Default options: Typescript Typescript is unable to interpret imported s","default_branch":null,"files":null,"tree":[],"storefront":"/r/platypusrex","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/platypusrex/next-plugin-svgr/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}