-
-
Notifications
You must be signed in to change notification settings - Fork 608
style is not affective on vue demo #1152
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
Comments
I believe, I know why it happens: in their update from v3.6.0 to v4.0.0 they bumped Also, I am still struggling to figure out how to achieve old hash values with the latest UPDATED: And I found the second reason of changed hashes: |
It is expected, because we have some rare cases where generated classes can be potential same for difference classes, so we fix it, you can use |
You should not use old algorithm, because it has collisions as I described above Just regenerate classnames |
Because md4 is faster for hashing, it is the perf improvement |
Why you need old classes? We have |
@evilebottnawi well, I wouldn't care much about the algo you prefer, but... There is https://www.npmjs.com/package/babel-plugin-react-css-modules (125k weekly downloads) I guess, I'm now to fork & update them sometime soon :) And I am not sure what Vue is using, but I guess in the nutshell it bumps into a similar problem ¯_(ツ)_/¯ |
|
I use it in my React setup since 2018. It looked like a great choice back then, and it did not caused me any issue since. If something is not broken I don't fix it :) I'll appreciate if you suggest a better alternative, or warn me about any incompatibility issues beside the classname difference discussed above. With what I know currently, the option to just fork / update / package my own version of babel-plugin-react-css-modules seems like the easiest and fastest to me :) |
You can use |
I guess, it would work if I pass server-side code through Webpack, but that's not how I do stuff. I only use Webpack to bundle the client-side code, and the server-side code I just compile with Babel only. |
hm, make sense, in your case I recommend to migrate on the |
Could you provide an example on what to specify as After looking at the implementation this looks like a huge pain in the ass to fix. |
You can find example in README, if you need help with implementation, please provide repo with example and I will help |
Here is my fork of @evilebottnawi it would be very handy if you export |
@birdofpreyru Sorry we can't export |
For the reason you told: to not have to update dependent code each time you change something inside |
Changes are not critical in all cases, but it can be breaking change for developers who rely on this, it was discussed already, for example we can change first characters if class starts number on other |
But by exporting it, tools like This is clearly better than them having to re-implement your logic, and then having to make a fixed release ASAP whenever something changes here (or preventing people from upgrading if they don't)... |
It will violate semver, I don't want to do it without no real good reason, because many developer starts to use it, we will get a lot of issue after new release, what is a problem with copy/paste, code is very small |
It uses code from other libraries ( |
Anyway, would it really be a problem to use semver-major releases for changes to that logic? I guess you don't change it that often... |
It used to happen often, now less often, ok, i am ready to consider exporting this, but it will still be internal and can't change in any version, so if want to rely on this, use pinned version of css-loader in your app, but my recommendation is avoid it |
Expected Behavior
I use wepback make a simple vue demo, try to use scss-loader parse scss style, expect below picture
Actual Behavior
but,now is this picture. You can css style is not become effective, because <style> attribute is not appear to html.

Code
// additional code, HEY YO remove this block if you don't need it
Solution
I try to downgrade css-loader to 3.5.3,webpack builded ok,I dont know why is it.
The text was updated successfully, but these errors were encountered: