-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
@parcel/transformer-css errorRecovery flags configurable from .parcelrc, with clearer errors from watch and build #8776
Comments
|
Hi @devongovett, thank you for your feedback. Obviously Im a newcomer just coming in, and so am reflecting my on boarding experience with this useful feature. What I understand you are saying is that 'plugins' which in this case is I obviously don't understand the challenges as well as yourself (or what has been debated before - soz!). But its odd to me that we can pass configuration to Is there another route, like creating a custom configuration that could move this flag out of our |
Let me explain in more detail. Let's say you have a {
"extends": "@company/parcel-config",
"options": {
"@parcel/transformer-css": {
"errorRecovery": true
}
}
} and {
"extends": "@parcel/config-default",
"options": {
"@parcel/transformer-css": {
"drafts": {
"nesting": true
}
}
}
} It's hard to know in the general case whether these two options objects for In this case, |
@devongovett Thank you for taking the time to write this up, I believe that I have a better understanding of the challenge the project faced and the hows and whys behind adopting this approach. In my own case, I was trying to avoid having optional config in Given what you've said, I can also see my second point re specific warnings re I'll see if I can contribute to the docs around this, as the feature looks to be fairly static and unlikely to change in the near term. Thanks again ~ |
💬 RFC
🔦 Context
The new
@parcel/transformer-css
errorRecovery
flag appears to make it possible for us to modernise our tooling while while we migrate away from dependancies that still include a few IE css hacks. However the flag is not very well documented, and unintuitive to implement.Perhaps it is possible to set the flag in
.parcelrc
, and I've just not managed to do it correctly, but at the very least its undocumented. If it is not possible, then this would seem to contradict the current documentation for.parcelrc
. I for one, would very much prefer specific config to be kept out ofpackage.json
, however it doesn't appear that there is currently a way to pass custom config options to transformers and the like.--error-recovery
flag towatch
andbuild
, however it may not be ideal to do so as these tools cover a wide range of operations. However, if the--error-recovery
flag was encountered, perhaps a more useful error message could be given to users.I've already submitted an issue for regarding documentation. But ideally the API would change so that
.parcelrc
could be used instead.💻 Examples
As
.parcelrc
config with hypotheticaloptions
object:As flag:
The text was updated successfully, but these errors were encountered: