Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when requiring a missing css file #189

Closed
thomas-darling opened this issue Feb 12, 2016 · 1 comment
Closed

Error when requiring a missing css file #189

thomas-darling opened this issue Feb 12, 2016 · 1 comment
Assignees
Labels

Comments

@thomas-darling
Copy link
Sponsor

This error only occurs when we bundle our app - when unbundled, it just continues with no error.

Basically, if the app is bundled and a view require a css file that does not exist, the app crashes with a fairly unhelpful error message - and it gets even worse when minified: "b.replace is not a function":

<require from="./app-logo.css"></require>       <-- this file does not exist

error when referencing missing css file

Stepping through the code reveals that the css argument, which is normally a string, somehow becomes an empty object if the css file is missing - but again, it only happens when the app is budled:

breakpoint when referencing missing css file

The unhelpful error message aside, it's a really nasty surprise to encounter after making a release, so I would strongly prefer that it outputs a warning or error message both when bundled and unbundled.
Maybe just a warning when unbundled, so it doesn't get in the way of the dev workflow - reason for this is that e.g. the LESS compiler does not create a .css file unless the .less file produces non-empty CSS output.. so even though the .less file exists, it may not actually produce a .css file, either because the .less file is empty, or because it contains only variables or mixins, but not yet any style rules that would produce CSS output.

@EisenbergEffect EisenbergEffect self-assigned this Feb 12, 2016
@EisenbergEffect
Copy link
Contributor

We can easily provide a warning message for this. Thanks for letting us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants