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

Fix Module Order Warnings for Projects using Mini-Css-Extract-Plugin #192

Merged

Conversation

pulkitkkr
Copy link
Contributor

@pulkitkkr pulkitkkr commented Oct 21, 2022

Summary

While using a File-System-based automated bundle generation feature, miscellaneous warnings suggesting css order conflicts were encountered due to the mini-css-extract-plugin. This PR mutes those warnings by using the ignoreOrder flag which can be configured using css_extract_ignore_order_warnings flag in webpacker.yml

Tried Solutions

  • Topological Ordering of Packs when loaded using append_stylesheet_pack_tag and stylesheet_pack_tag
  • Re-order CSS imports
  • Removal of CSS imports as globals.
  • Debug Components usage and import order.

Risks Involved

For projects where CSS order has not been mitigated through consistent use of scoping or naming conventions, the CSS order warnings are essential and may result in visual differences.

@pulkitkkr pulkitkkr force-pushed the pulkitkkr/mute-mini-css-extract-plugin-order-warnings branch from 15780d9 to 79039d9 Compare October 21, 2022 18:36
Copy link
Member

@justin808 justin808 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make this configurable:

css_extract_ignore_order_warnings

Default can be false.

MAYBE, Version 7 can consider making the default true to suppress warnings.

Copy link
Member

@justin808 justin808 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 👍

@justin808 justin808 merged commit 0a1931f into master Nov 1, 2022
Eric-Guo added a commit to Eric-Guo/shakapacker that referenced this pull request Nov 2, 2022
justin808 pushed a commit that referenced this pull request Nov 4, 2022
@ahangarha ahangarha deleted the pulkitkkr/mute-mini-css-extract-plugin-order-warnings branch April 20, 2023 10:16
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.

2 participants