kitze / custom-react-scripts

[DEPRECATED, use customize-cra] Allow custom config for create-react-app without ejecting
https://custom-react-scripts.netlify.com
MIT License
993 stars 97 forks source link

How to tell when less is loaded? #140

Open Smudded opened 6 years ago

Smudded commented 6 years ago

I'm using the the less-loader in my project, and due to some interesting circumstances I care about the height of my app when it first renders. Unfortunately, when the app finishes its first render the styles have not yet loaded. It doesn't seem there's a way to tell when the styles have loaded and store that state within my app so I can delay any kind of measuring I do. I've attempted importing the less file and checking the resulting object, but it seems to be empty. I may just be looking in the wrong places, but any suggestions would be appreciated!