Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement the SVGR and SVGO configuration files
All configurations for SVGR are set in the `svgr.config.js` file instead of passing them to the corresponding Gatsby plugin for the Webpack loader. - `expandProps` = `end` - ensure props are always spread (`{...props}`) last on the root `<svg>` element. - `ext` = `jsx` - use the JSX file extension for generated components. - `icon` = `false` - ensure the `width` and `height` props (hardcoded `1em` value) are not added. - `ref` = `true` - export components using React's `forwardRef` API to reference the underlying component and allow access to the root SVG element which is necessary for animations. - `svgo` = `false` - all SVG files in this project are already optimized with SVGO using the included `.svgo.yml` configuration. The configuration for SVGO is implemented in the `.svgo.yml` file that is also placed in the project root and will be picked up by SVGO automatically. GH-72
- Loading branch information