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(v2): remove css order warning if css imports are not sorted #2042

Merged
merged 1 commit into from
Nov 24, 2019

Conversation

endiliey
Copy link
Contributor

@endiliey endiliey commented Nov 24, 2019

Motivation

Mini-css extract plugin complains if your css imports are not sorted.
In our use case, we have the order warning because in our markdownfeatures.mdx, we import Tabs and BrowserWindows which has a CSS modules inside of it.

Quoting from webpack-contrib/mini-css-extract-plugin#250

  • Sorting all imports (not just in files but in tree traversal import order is difficult to do in a large project, and impossible
  • Consistent use of scoping or naming conventions in CSS makes the order of CSS import irrelevant, and this is a much more manageable strategy for a large project

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

Before
before warning
After
image

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Nov 24, 2019
@endiliey endiliey added the pr: bug fix This PR fixes a bug in a past release. label Nov 24, 2019
@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-2 ready!

Built with commit 283d41d

https://deploy-preview-2042--docusaurus-2.netlify.com

@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-preview ready!

Built with commit 283d41d

https://deploy-preview-2042--docusaurus-preview.netlify.com

Copy link
Contributor

@yangshun yangshun left a comment

Choose a reason for hiding this comment

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

Thanks for fixing it

@yangshun yangshun merged commit 3abd281 into master Nov 24, 2019
@endiliey endiliey deleted the endi/ignoreorder branch November 26, 2019 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants