Closed satoshi-cyber closed 3 years ago
I believe this should work:
// put this in a file called ".svgrrc.js":
module.exports = {
svgoConfig: {
plugins: {
removeViewBox: false
}
}
};
FWIW this is something specific to microbundle-crl
, which is a fork. Microbundle itself does not allow importing SVGs.
.svgrrc.js
Hi @developit, where did you create this file?
When I'm trying to use a SVG as React component
the viewBox attribute is missing in generated bundle file
even though it exists on SVG
I'm using this to make the bundle: