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

Remember related files for Sass on syntax error #9315

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

bdukes
Copy link
Contributor

@bdukes bdukes commented Oct 12, 2023

↪️ Pull Request

When watching Sass files, an error from the Sass compiler will cause Parcel to no longer about which files a Sass entry file imports (i.e. which files will cause the entry file to be invalidated). This is documented in #7374 and #9292.

This PR remembers the previous invalidations and reapplies them to the input file in the case of an error.

Presumably this issue also affects other transformers (it's documented to also apply to Pug and Elm, at least), so perhaps this resolution is at the wrong level (maybe should be in RequestTracker?), but it does resolve the problem for Sass in the meantime.

💻 Examples

See #9292

🚨 Test instructions

See #9292

✔️ PR Todo

@mischnic
Copy link
Member

mischnic commented Oct 16, 2023

The problem with this approach is that it only works for watch mode and only if you don't restart Parcel while there's a Sass error.

@bdukes
Copy link
Contributor Author

bdukes commented Oct 16, 2023

Certainly it would be better if it worked from a cold-start, but that is out of our control. This workaround approach, however, resolves 99% of the situations where we run into issues.

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