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

Inconsistent chunk styles and possible missing docs #124

Closed
nmonterroso opened this issue May 3, 2018 · 5 comments
Closed

Inconsistent chunk styles and possible missing docs #124

nmonterroso opened this issue May 3, 2018 · 5 comments

Comments

@nmonterroso
Copy link

Node v9.9.0, latest packages installed, sample project

I'm noticing a couple issues, not sure if it's a webpack bug or for this project:

  1. Depending on the order in which chunks are loaded it's possible for styles to be inconsistently applied to the page
  2. Possible missing documentation for using single css chunk.

The second seemed related to what @ezzatron was seeing in #116 with a single page app that was unresponsive since it's demonstrated (along with a potential fix) in my demo project.

I tried to include as much information on the issues in the demo project, but let me know if there's more that's needed to push this forward. Happy to help in any way I can.

@alexander-akait
Copy link
Member

Possible missing documentation for using single css chunk.

https://github.com/webpack-contrib/mini-css-extract-plugin#extracting-all-css-in-a-single-file

Is that something missing?

@alexander-akait
Copy link
Member

We don't have a lot of time on documentation 😞 If you have some ideas how we can improve this, PR welcome. Right now I'm almost alone support all webpack-contrib/* repos and have regular job. It is hard to answer all. You can also investigate what happens and if it is bug send PR to fix it.

@oscarlgz
Copy link

Did you manage to solve the issue @nmonterroso? I'm running in to this issue as well. When switching between pages that resolve different chunks (and where classes use compose from css-loader), the styles will sometimes be applied in the incorrect order.

@nmonterroso
Copy link
Author

@oscarlgz I didn't solve the issue but sidestepped it by bundling all the css into a single file. See the style-combine-demo in my sample project for my notes on that approach. Let me know if that helps!

@michael-ciniawsky
Copy link
Member

michael-ciniawsky commented Aug 24, 2018

#246 But CSS Ordering is still not 💯 deterministic and likely never will be, you will get spammy warnings in case chunk1 and chunk2 imports modules in a different order, otherwise css-modules usage is encouraged to avoid issues wit ordering (e.g the CSS Cascade) altogether

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

No branches or pull requests

4 participants