File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,15 @@ interface ConfigEntry {
5555 `${ __dirname } /tmp/devicon/icons/${ entry . name } /${ name } .svg`
5656 ) ;
5757 const optimizedIcon = svgo . optimize ( icon , {
58- plugins : [ "removeStyleElement" ] ,
58+ plugins : [
59+ {
60+ name : "inlineStyles" ,
61+ params : {
62+ onlyMatchedOnce : false ,
63+ } ,
64+ } ,
65+ "removeStyleElement" ,
66+ ] ,
5967 } ) as svgo . OptimizedSvg ;
6068 const { document } = new JSDOM ( optimizedIcon . data ) . window ;
6169 const dir = `${ __dirname } /tmp/dist/${ entry . name } /${ version } ` ;
@@ -112,10 +120,9 @@ module.exports = function ${reactName}({size = "1em", ${
112120 }
113121 }
114122 }
115- return (${ ( await svgtojsx ( svg . outerHTML ) ) . replace (
116- "<svg" ,
117- "<svg {...props}"
118- ) } );
123+ return (${ (
124+ await svgtojsx ( svg . outerHTML )
125+ ) . replace ( "<svg" , "<svg {...props}" ) } );
119126}`
120127 ) ;
121128 const definitions = `import React from "react";
You can’t perform that action at this time.
0 commit comments