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

Remove sass url loader, move url resolving to PostCSS #1909

Merged
merged 1 commit into from Aug 23, 2018

Conversation

DeMoorJasper
Copy link
Member

@DeMoorJasper DeMoorJasper commented Aug 19, 2018

This PR moves url resolving to PostCSS instead of relying on SASS to work.

Figured it might be worth it as it has been a pretty stale issue on the SASS end for a lil while now.

Closes #316

Note to anyone looking at this in the future, the reason this didn't work is because unquoted arguments aren't valid sass and cannot be handled by a sass function: https://sass-lang.com/documentation/syntax/special-functions#url

@devongovett
Copy link
Member

Won't this be slower since it will have to reparse the generated css?

@DeMoorJasper
Copy link
Member Author

@devongovett probably, but at least it works.
It doesn't seem like the sass maintainers are gonna solve this issue any time soon, we can always change it back once they do solve it.

@devongovett
Copy link
Member

I take it dart-sass has the same issue? Maybe we can just contribute?

@DeMoorJasper
Copy link
Member Author

Yes dart-sass has the same issue (as it's implementation tries to be identical to node-sass, it's just a little stricter and 100% JS, which makes it more stable in case of our workerfarm setup), not sure if it's a feature or an actual bug.
From the issue we have it seems to be a feature they haven't fully worked out yet from a design perspective although I'm not sure.

This seemed like the cleanest way to implement a hotfix for the meantime.

@DeMoorJasper
Copy link
Member Author

Found the issue where they're discussing the url loader design sass/sass#2535

@devongovett
Copy link
Member

ok sure, but even if they are re-designing it seems like a bug that it works when quoted but not when unquoted...

I will merge this for now, but let's keep an eye on that sass issue and revert once they figure it out so we regain some performance.

@devongovett devongovett merged commit 6ef0786 into master Aug 23, 2018
@devongovett devongovett deleted the fix/sass-urls branch August 23, 2018 18:29
devongovett pushed a commit that referenced this pull request Oct 15, 2018
devongovett pushed a commit that referenced this pull request Oct 15, 2018
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