only apply user plugins to loader#111
Merged
madyankin merged 8 commits intomadyankin:masterfrom Aug 20, 2020
Merged
Conversation
The input `css` has already been processed by any plugins before `postcss-module`, and the output will be processed by any plugins after. We shoud not run all the user plugins again. However, for anything that is loaded in by the loader (such as from `composes`), we should run the plugins that were listed before `postcss-modules`, so that the css that is brought in can catch up.
cf66e43 to
aa114f5
Compare
tjenkinson
commented
Aug 14, 2020
aa114f5 to
3cc479a
Compare
Owner
|
Thanks for the PR! Sorry, didn't noticed the PR earlier. I'm pretty loaded now, will take a look in a couple of days. |
Contributor
Author
|
No worries. Thanks! |
madyankin
requested changes
Aug 20, 2020
|
|
||
| const plugins = [ | ||
| autoprefixer, | ||
| postcss.plugin( |
Owner
There was a problem hiding this comment.
Could you extract this test in a separate test case to not mess up the other tests?
Contributor
Author
There was a problem hiding this comment.
can do but I thought this was a good thing to assert for all the cases?
Contributor
Author
There was a problem hiding this comment.
I made it a new test for all the cases. This ok?
Owner
|
Published in 3.2.1 |
Contributor
Author
|
Awesome thanks for the quick review! :) |
This was referenced Aug 20, 2020
1 task
This was referenced Jun 22, 2021
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 free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The input
csshas already been processed by any plugins beforepostcss-module, and the output will be processed by any plugins after. We shoud not run all the user plugins again.However, for anything that is loaded in by the loader (such as from
composes), we should run the plugins that were listed beforepostcss-modules, so that the css that is brought in can catch up.Does this make sense? It fixes the problem for us.
Think this fixes #70