Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !12013

Added app name as hash salt for css modules ident

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Administrator requested to merge github/fork/pstrh/pr/increase-css-module-hash-uniqueness into main Feb 01, 2022
  • Overview 2
  • Commits 2
  • Pipelines 0
  • Changes 3

Created by: pstrh

Fixes CSS Module class name collisions (#9134 and #10190) by adding the app name as a hash salt. The change preserves #6875 (closed). The css module hash is stable within the project but globally unique (as long as the app name is unique).

Test steps:

  • Create an application
  • Create a App.module.css, import and use it in App.js
  • Start the application and check the generated hash
  • Stop the application and change appName in package.json
  • Start the application and check the generated hash

Previous: The generate css module hash stays the same.

Now: The generate css module hash changes as the app name has been changed.

Please let me know if you need more information.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/pstrh/pr/increase-css-module-hash-uniqueness