Closed vovanezha closed 5 years ago
Could you explain how it should work for your case?
For example, If I want to know which styles are unused I write something like used-styles --path ./dist
in the console and get output in a new file or directly in console
No. You don't get the point of the package - it reports which styles were used right now, when you have rendered exactly this HTML. There is no way it could scan/parse/tokenize source codes and figure out which styles were used, and which were not. The best it could - try to find all the existing styles (as-is) in the sources, but that would not work well.
Hmm, okay, I got you. But we already have Coverage tool directly in Chrome DevTools that can show you what JS and CSS are unused at load and run time. Probably, you need to explain users why they should use your tool
I thought that was clear from the readme and examples provided - to send "used styles" to the browser during SSR.
That's more about code splitting and tracking which .css
file should be sent to the browser if some class
got used.
Oh, now I understood. But anyway, it's was unclear from the readme, at least for me
Nobody perfect 🤷♂️
It will be great if you will add CLI for that tool