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

Parcel doesn't pick up new CSS change on local development when stylesheet extraction is enabled. #1306

Open
liamqma opened this issue Oct 31, 2022 · 0 comments
Assignees
Labels
developer experience 🏖️ It's something that improves the developer experience has workaround 💫 You can work around this bug.

Comments

@liamqma
Copy link
Collaborator

liamqma commented Oct 31, 2022

Describe the bug
Parcel doesn't pick up new CSS change on local development when stylesheet extraction is enabled.

To Reproduce

git clone git@github.com:atlassian-labs/compiled.git
yarn
yarn run start:parcel
  • Wait for the web page to load
  • Make a CSS change
  • The new change doesn't appear even if refreshing the browser

Expected behavior
The newly made CSS change should appear on local development

Additional context
This bug is introduced from #1303. parcel-optimizer is used to get stylesRules from asset.metadata and insert it to HTML. When a CSS change is made, Parcel won't know a need to re-run parcel-optimizer because there isn't a dependency between HTML and css change in the js file.

The workaround is to disable stylesheet extraction on local but ideally what we want is:

Any of the source files that CSS came from should be considered a dependent of the HTML”, so that if they’re modified, the HTML is 're-optimized'.

@liamqma liamqma added developer experience 🏖️ It's something that improves the developer experience has workaround 💫 You can work around this bug. labels Oct 31, 2022
@liamqma liamqma self-assigned this Oct 31, 2022
@dddlr dddlr mentioned this issue May 1, 2024
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer experience 🏖️ It's something that improves the developer experience has workaround 💫 You can work around this bug.
Projects
None yet
Development

No branches or pull requests

1 participant