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

ignoreOrder option #362

Closed
skrobek opened this issue Mar 14, 2019 · 4 comments · Fixed by #422
Closed

ignoreOrder option #362

skrobek opened this issue Mar 14, 2019 · 4 comments · Fixed by #422

Comments

@skrobek
Copy link

skrobek commented Mar 14, 2019

Hello!

I'm using the newest package version 0.5.0 which I use to replace deprecated extract-text-webpack-plugin with webpack 4.

With the old plugin, we had ignoreOrder: true inside our config (needed for CSS) to have our styles loaded in the correct way. After we upgraded to webpack4 and mini-css-extract-plugin I can't find the related option and our CSS modules are not loaded in the correct way. Is there a similar option that might fix our problem ?

@alexander-akait
Copy link
Member

No similar option, you need fix order, please provide minimum reproducible test repo

@hedgepigdaniel
Copy link

As has been pointed out in #250:

  • Sorting all imports (not just in files but in tree traversal import order is extremely difficult to do in a large project
  • 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 as @jsg2021 said in New version 0.4.2 capture lot of warnings #250 (comment)
  • Using stats.warningFilter as recommended by @sokra in New version 0.4.2 capture lot of warnings #250 (comment) or webpack-filter-warnings-plugin is not a good solution. It would be much better to avoid generating the warnings at their source (optionally) rather than to partially filter them later with regexes. I use webpack-error-on-warnings-plugin to enforce that there are no warnings in a build. This is incompatible with filtering warnings, because it must happen in the before-emit hook so that it prevents emission of assets when there are warnings. The warnings filtering happens in the done hook or in the toJson method, which is too late.

@alexander-akait
Copy link
Member

Feel free to send a PR ignoreOrder: true to avoid problem and warnings

@alexander-akait
Copy link
Member

Also we need update docs about usage warningFilters for avoid error in output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants