Skip to content

[2.0.5] CSS Modules hash mismatch (React SSR) #222

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

Closed
chrisblossom opened this issue May 9, 2017 · 3 comments
Closed

[2.0.5] CSS Modules hash mismatch (React SSR) #222

chrisblossom opened this issue May 9, 2017 · 3 comments
Assignees
Labels

Comments

@chrisblossom
Copy link

I have a React SSR that uses Webpack on the client and server. After updating to postcss-loader v2.0.3, my generated CSS Module hash's are different on the client and the server.

I am unsure if the issue is related to postcss-loader directly or if it is a new/updated dependency brought in by v2.0.3.

I can bring up a skeleton repository if that would help to demonstrate the issue I am having.

@michael-ciniawsky
Copy link
Member

@chrisblossom Yep please provide a small repo, are you using sourcemaps in postcss-loader ?
Note that we are in the transition phase to move CSS Modules from css-loader into postcss-loader via a compatible PostCSS Plugin in the future

@michael-ciniawsky michael-ciniawsky self-assigned this May 9, 2017
@michael-ciniawsky michael-ciniawsky changed the title Universal css modules mismatch [2.0.3] CSS Modules hash mismatch (React SSR) May 9, 2017
@michael-ciniawsky michael-ciniawsky changed the title [2.0.3] CSS Modules hash mismatch (React SSR) [2.0.5] CSS Modules hash mismatch (React SSR) May 11, 2017
@chrisblossom
Copy link
Author

During the process of gutting my app to give an example repository, I found the following in my server webpack config:

        new webpack.LoaderOptionsPlugin({
            options: {
                context: __dirname,
            },
        }),

After removing that, everything works as expected. Thanks for the quick reply!

@theasia-Ashish
Copy link

@chrisblossom your comment save my life, after struggling this checksum warning nearly a month.

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

No branches or pull requests

3 participants