I am using NEXT.js.
I added [SVGR][1] into project in order to use SVGs as react components.
The problem is cus in some places I want to use SVGS as img, and svgr not support that, which means all my svgs that are displayed in <img tag is not shown.
How to make a next.config to support both way of displaying SVG in a img and as react component?
module.exports = withSvgr({
webpack: (config) => {
config.resolve.fallback = {
http: false,
https: false,
};
config.resolve.modules.push(path.resolve('./'));
return config;
},
});