Uh oh!
There was an error while loading. Please reload this page.
Fix preprocessors not running on stylesheets imported from stylesheets - #7950
Closed
joshhunt wants to merge 1 commit into
Closed
Fix preprocessors not running on stylesheets imported from stylesheets#7950joshhunt wants to merge 1 commit into
joshhunt wants to merge 1 commit into
Conversation
joshhunt
requested review from
ianschmitz, iansu, mrmckeb and petetnt
as code ownersNovember 8, 2019 15:00
joshhuntforce-pushed
the
fix-import-loaders
branch
from
November 11, 2019 15:33
a9175ce to
85fad0bComparejoshhuntforce-pushed
the
fix-import-loaders
branch
from
December 5, 2019 09:43
85fad0b to
891eb94Comparejoshhunt
commented
Dec 9, 2019
Author
This issue is still present with create-react-app v3.3.0, and this PR still fixes it 😃 |
Mati365
commented
Jan 2, 2020
Any changes? |
Dakkers
commented
Jan 31, 2020
ianschmitz
commented
Jan 31, 2020
Contributor
Ah apologies, I didn't see this PR. Yes it's been fixed already in 3.3.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#7919 and fixes#7777
An extra loader to preprocessed CSS files was introduced in 914c95e#diff-dc0c4e7c623b73660da1809fc60cf6ba, but the
importLoadersoption was not updated to account for this.This meant that when a stylesheet was imported from another stylesheet (like when using .
@importas reported in #7777, orcomposes:reported in #7919), Webpack would not run all required loaders over the imported stylesheets. As theimportLoadersvalue was still2, it would runpostcss-loaderandresolve-url-loaderbut most importantly, it incorrectly skipped the preProcessor,I fixed the issue here, and added a small comment warning future developers about this, as seen elsewhere in the webpack config.
I verified this change by running it over my reproduction case mention in #7919.