- 
                Notifications
    You must be signed in to change notification settings 
- Fork 460
feat: Add vite-plugin-icons-spritesheet instead of the custom build script #984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add vite-plugin-icons-spritesheet instead of the custom build script #984
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I'm a fan. Thanks a lot!
| @AlemTuzlak this is awesome. Should the  | 
| Thank you, it probably should 😅 | 
| 
 I'd suggest something like:  | 
| Fixed. Thanks! | 
| I opened an issue thinking that my app was broken and Kent kindly pointed me to here. When I try and install a new icon I get hit with an error  I've used  | 
| @damiensedgwick Seems to be related to sly.json config, it tries to run the build icons script everytime you pull in a new icon, if you change the script in /other/sly/sly.json to: {
	"$schema": "https://sly-cli.fly.dev/registry/config.json",
	"libraries": [
		{
			"name": "@radix-ui/icons",
			"directory": "./other/svg-icons",
			"postinstall": [],
			"transformers": [
				"transform-icon.ts"
			]
		}
	]
}does it work? | 
| 
 edit: maybe not, my icons are not showing: | 
| @damiensedgwick are you running the dev server? or did you run npm run build? . Feel free to add me on discord so we can figure it out, I've used sly to pull in icons with this plugin so it definitely should work Edit: | 
| 
 I've ran both the dev server and built it, as well as validated and it did work for the gear but for some reason something isn't quite lined up now when I tried adding two more icons. I will add you on Discord, cheers! | 
| 
 Tried installing icons whilst the server was running and it worked as expected. Then tried stopping the server and installing, and it also worked as expected so I am not really sure what was happening but all is right with the icons now. | 

Test Plan
Checklist
Screenshots