react-static-plugin-svgr
A React-Static plugin that adds @svgr/webpack loader
Installation
In an existing react-static site run:
$ yarn add react-static-plugin-svgr
Then add the plugin to your static.config.js
:
export default {
plugins: ["react-static-plugin-svgr"]
};
With Options
export default {
plugins: [
[
"react-static-plugin-svgr",
{
svgo: true,
svgoOptions: {
plugins: [
{
removeViewBox: false
}
],
memo: true
// other options for the @svgr/webpack (https://react-svgr.com/docs/webpack)
}
]
]
};