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

fix(v2): dev css modules classnames should include filename #5034

Merged
merged 1 commit into from
Jun 22, 2021

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Jun 22, 2021

Motivation

Add the css module filename to avoid potential dev classname collisions.

Fix #5018

If it's not enough we can also add the hash in dev

See doc: https://webpack.js.org/loaders/css-loader/#localidentname

@netlify
Copy link

netlify bot commented Jun 22, 2021

✔️ [V2]

🔨 Explore the source changes: 08b4fee

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/60d1c1e76daaa80007178f73

😎 Browse the preview: https://deploy-preview-5034--docusaurus-2.netlify.app

@github-actions
Copy link

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 58
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-5034--docusaurus-2.netlify.app/

@github-actions
Copy link

Size Change: 0 B

Total Size: 569 kB

ℹ️ View Unchanged
Filename Size
website/build/assets/css/styles.********.css 87.8 kB
website/build/assets/js/main.********.js 385 kB
website/build/blog/2017/12/14/introducing-docusaurus/index.html 65.8 kB
website/build/docs/introduction/index.html 235 B
website/build/index.html 30.5 kB

compressed-size-action

@slorber slorber merged commit 4e88ea0 into master Jun 22, 2021
frilox042 added a commit to frilox042/docusaurus-plugin-sass that referenced this pull request Jun 23, 2021
Add the css module filename to avoid potential dev classname collisions.

See:
facebook/docusaurus#5034

Docusaurus just merged this behaviour in master.
I think this plugin should follow the same behaviour.

Also, I personally encounter classname collisions in development.
@slorber slorber deleted the slorber/fix-css-module-identName-dev branch August 17, 2021 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
2 participants