Skip to content


css module hangs when file doesn't exist #25

jfgilliam opened this Issue · 2 comments

2 participants


I want to load a css module only if it exists. This is to allow end users to create an overrides.css if they want to override what I deliver. I think this is better than them modifying my css or modifying the markup to include theirs, because an update will wipe out their changes. Is there a way to conditionally load the file?


Do you have a way of determining (through some configuration) if the css module should be loaded prior to attempting to load it? Or do you want to just always try to load and see if there is a 404? Do you need notification for when the CSS was loaded? If you just need to request a stylesheet, you can do so like this:
If you need to be notified, you can use that plugin module. You could also conditionally call the load method based on some configuration information, if you have that available to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.