-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Avoid different chunks' content after each build for Vue components with @apply #3356
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3356 +/- ##
=======================================
Coverage 93.28% 93.28%
=======================================
Files 178 178
Lines 1831 1831
Branches 324 323 -1
=======================================
Hits 1708 1708
Misses 105 105
Partials 18 18
Continue to review full report at Codecov.
|
Thank you, this looks solid 👍🏻 Appreciate you digging deep and contributing the solution to your problem, I'll try and get a tag out for this soon. |
Thanks for merging! |
When we use
@apply
in the styles of the Vue component, the resulting chunks' content is different after each build (the reason why I want chunks' content to be the same after each build described here: #3349).And the difference lays here:
That's because PostCSS generates random
Input#id
iffrom
is not provided (https://postcss.org/api/#input-id).So in order to fix the problem described above,
from
needs to be provided. That's what this PR does.I was wondering about the best value for the
from
option and had decided to use__filename
since the idea of thefrom
option is to help users to find the source of the CSS (thanks @ai: postcss/postcss#1512 (comment))Fixes #3349