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

Warn on missing asset in compiler #31

Merged
merged 2 commits into from Nov 25, 2021
Merged

Warn on missing asset in compiler #31

merged 2 commits into from Nov 25, 2021

Conversation

brenogazzola
Copy link
Collaborator

If an asset cannot be found when processing a CSS file, warn and replace with url('') instead of raising.

I did a quick test and the empty url does not seem to generate any extra network requests.

@dhh
Copy link
Member

dhh commented Nov 23, 2021

Kinda thinking that in this case it's probably better to let the original url() go through because then you'll create a proper 404 as well. That's different from source maps because those are optional. If someone is referring to url() in css and the asset isn't there, things are broken.

@brenogazzola
Copy link
Collaborator Author

Sorry, I misunderstood what you meant. Adjusted to preserve the original url.

@dhh dhh merged commit 7f60c9d into main Nov 25, 2021
@brenogazzola brenogazzola deleted the ignore-missing branch November 25, 2021 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants