Improve Caching
I noticed that when I restart my app none of the styles have been loaded/generated. Every time I restart the app I see the whole app unstyled.
I was talking with @nmn and he said that stylex relies heavily on caching. To me it seems like there is something that could be improved here.
Here is me restarting the dev server and all the styles getting blown away
https://github.com/nonzzz/vite-plugin-stylex/assets/1192452/00123141-c379-4a78-9792-8a4069783319
Here is an example of styles flashing on refresh
https://github.com/nonzzz/vite-plugin-stylex/assets/1192452/16fbd7e0-c4c9-4496-9516-5c481619082e
I think the challenge is that both file transformation and the metadata for each file needs to be cached. This has been challenging with most bundlers, but there should be some APIs to do so.
I've been busy at this month. I'll take some time at next week to find a way.