How do I avoid the warning: chunk styles [mini-css-extract-plugin] Conflicting order in GatsbyJS? How do I avoid the warning: chunk styles [mini-css-extract-plugin] Conflicting order in GatsbyJS? reactjs reactjs

How do I avoid the warning: chunk styles [mini-css-extract-plugin] Conflicting order in GatsbyJS?


I'm not sure it will fix your problem as well, but in my case I had to reorder the imports alphabetically in one of the components


The order needs to be consistent everywhere the imports are referenced; otherwise webpack doesn't know how to order them when it creates the chunks.

This comment (which happens to be in a CRA issue) explains it well:https://github.com/facebook/create-react-app/issues/5372#issuecomment-685932009


In my case, I moved react-slick css import after all other imports.

import "slick-carousel/slick/slick.css" import "slick-carousel/slick/slick-theme.css"