svg-to-ts-object generates consts
See original GitHub issueHello, I had previously and successfully configured for v7 and am now trying to configure with v8. My understanding is I should run npx svg-to-ts svg-to-ts-object
and this replaces conversionType: "object"
in the config. However, when I run npx svg-to-ts svg-to-ts-object
, svg-to-ts generates consts and not an object. What am I doing wrong?
"scripts": {
"generate-icons": "npx svg-to-ts svg-to-ts-object"
},
"svg-to-ts": {
"srcFiles": [
"./src/icons/**/*.svg"
],
"outputDirectory": "./src/icons",
"objectName": "iconSvgStrings",
"interfaceName": "IconSvgStringInterface",
"typeName": "IconSvgStringType",
"svgoConfig": {
"plugins": [
"cleanupAttrs"
]
},
"fileName": "index"
},
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
ReactJS: How to load SVG dynamically from an const object?
I'm trying to load SVG's dynamically via a const object to easily reuse in other blocks. But the SVG doens't show. When i...
Read more >kreuzerk/svg-to-ts: Build performant SVG icon libraries by ...
svg -to-ts offers the possibility to generate TSX files (react components). offers three different conversion modes ('object', 'constants' and 'files'); each ...
Read more >SVGTransformList - Web APIs | MDN
The consolidation operation creates new SVGTransform object as the first and only item in the list. The returned item is the item itself...
Read more >React SVG: How to use SVGs best in React - CopyCat Blog
In this article, we'll look at react SVG - importing SVG into react, how to convert SVG to components, and much more.
Read more >How to create svg elements with Javascript
How to create svg elements with Javascript ... const postNodes = posts.map((post) => { // Create the DOM elements const postCard = document....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry, you are right your command was correct. I overlooked the
npx
call. I will try to take a lookThx for reporting the issue 👍