Vite plugin for RFG
Opened this issue · 6 comments
Feature Request
With Vite exploding in popularity as the next front-end build tool, it would be awesome to have a support for it from this library!
Any progress on this? Currently moving from Gulp to Vite.js and trying to implement RFG, this was the first search result coming up and seemingly the only one.
What would you expect from a RealFavicon plugin for Vite?
Why I'm asking: when I'm creating a favicon for a new project, I prefer to handle the whole thing as code that I can edit and commit, rather than rely on an external tool and API.
For example, the Ruby on Rails generator of the upcoming version of RealFavicon just gives instructions, there are no external dependencies (https://next.realfavicongenerator.net/favicon/ruby-on-rails).
For me it was because I was porting Gulp and there is a gulp package for RealFaviconGenerator, so I was looking for the same with Vite.js, but in the end I've just used the Node version https://realfavicongenerator.net/favicon/node_cli in a custom script in package.json
"fav": "real-favicon generate assets/favicon/faviconDescription.json assets/favicon/faviconData.json static/favicon/"
which works perfectly fine.
And why would you regenerate the favicon files and HTML? Why not just make them part of your codebase once for all? (no tricking question here, I've created that stuff after all 😁, I'm just doing some user research to understand expectations regarding static vs dynamic generation)
I have a Wordpress boilerplate theme, in which I create a lot of client sites. Part of creating a site is creating a favicon. The theme has a folder in which a favicon.svg gets dropped, then we can run npm run fav
when we want to generate the files (usually at the end of the project, when the logo has been finalised).
So it isn't so much 'regenerate', more 'generate'. It is nice that we can just change a few parameters (mainly the color) and every type of favicon gets generated based on the parameters and just one SVG file. I always used the site in the past, but always forgot doing it, so we moved the the Gulp process, which is nice because then we could just make it part of the build/deploy and always make sure the favicon was up to date with each deploy. Most of the time the favicon didn't change, but when it did that was a nice bonus that it would just be regenerated on deploy.
Thank you! That totally makes sense.
I'm currently rewriting the whole website, which will take a few months to complete. The ongoing work is hosted at https://next.realfavicongenerator.net. There won't be a Vite plugin anytime soon, but the new CLI tool should be standalone, meaning it won't rely on RealFavicon API.