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

Address the unstable CSS order in the web application production bundle: Tracking issue #42217

Closed
6 of 20 tasks
valerybugakov opened this issue Sep 28, 2022 · 0 comments
Closed
6 of 20 tasks
Labels
css-order-in-production frontend-platform Issues related to our frontend platform, owned collectively by our frontend crew. tracking

Comments

@valerybugakov
Copy link
Member

valerybugakov commented Sep 28, 2022

Problem to solve

The CSS rules order in the production environment is different from what we have in the development env. We can choose only one thing with the current build configuration:

  1. Consistent CSS rules order in production.
  2. Tree shaking powered by sideEffects: false.

See this comment on the unresolved issue:

In addition to that, mini-css-plugin makes no strong guarantee about the order of independent CSS files. It tries its best to keep the importing order, but there are some cases where this is not followed, e. g. because modules are split into multiple css bundles.
I would recommend to not rely on CSS order between multiple files in general.

See the Slack thread and the initial issue that triggered this investigation.

Measure of success

  • We have a consistent order of CSS rules in the production and development of web application bundles.
  • We use the production bundle for visual regression testing to ensure such issues are captured early.
  • The CSS tree-shaking works without changes.

Solution Summary

What specific customers are we iterating on the problem and solution with?

Internal Sourcegraph developers

Delivery plan

Tracked issues

@unassigned

Completed

Legend

  • 👩 Customer issue
  • 🐛 Bug
  • 🧶 Technical debt
  • 🎩 Quality of life
  • 🛠️ Roadmap
  • 🕵️ Spike
  • 🔒 Security issue
  • 🙆 Stretch goal

/cc @taylorsperry @muratsu

@valerybugakov valerybugakov added tracking frontend-platform Issues related to our frontend platform, owned collectively by our frontend crew. css-order-in-production labels Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-order-in-production frontend-platform Issues related to our frontend platform, owned collectively by our frontend crew. tracking
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants