Skip to content
GitLab
    • Explore Projects Groups Snippets
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
  • Issues
  • #8491
Something went wrong while setting issue due date.
Closed
Open
Issue created 5 years ago by Administrator@rootContributor
  • New related issue

  • Report abuse to administrator

  • New related issue

  • Report abuse to administrator

CSS Modules period in filename

Closed

CSS Modules period in filename

Created by: evankennedy

Same as closed #6910 (closed). Will provide a PR (#8492).

Describe the bug

When using CSS modules with an extra period in the class name, it will output the class name as if it has a period in it, which will be parsed as two separate classes and the classes will be unlinked from where they are used. I found this error when writing a CSS module for my story and wrote file.story.module.css.

Did you try recovering your dependencies?

N/A

Which terms did you search for in User Guide?

N/A

Environment

npx: installed 99 in 7.796s

Environment Info:

  current version of create-react-app: 3.4.0
  running from /home/evan/.npm/_npx/15086/lib/node_modules/create-react-app

  System:
    OS: Linux 5.3 Ubuntu 19.10 (Eoan Ermine)
    CPU: (4) x64 Intel(R) Core(TM) i7-6560U CPU @ 2.20GHz
  Binaries:
    Node: 10.15.2 - /usr/bin/node
    Yarn: 1.21.1 - /usr/bin/yarn
    npm: 6.13.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 80.0.3987.100
    Firefox: 72.0.2
  npmPackages:
    react: Not Found
    react-dom: Not Found
    react-scripts: Not Found
  npmGlobalPackages:
    create-react-app: Not Found

Steps to reproduce

  1. Add a CSS module file with an extra period.
  2. Add one class to the file.
  3. Import that file in a react component.
  4. Attach the class to an HTML element in the render.

Examples:

test.styles.module.css

.test {
  color: black;
}

Test.jsx

import React from 'react';
import styles from './test.styles.module.css`;
const Test = () => <div className={styles.test}>Test</div>;
export default Test;

Expected behavior

CSS class names are generated that are valid.

Actual behavior

Generates a class name with a period, so the class name will not match.

Screenshot from 2020-02-14 21-21-26 Screenshot from 2020-02-14 21-20-38

Reproducible demo

Can create if necessary, but this fix is simple.

An error occurred while loading designs. Please try again.
Tasks
0
server returned results with length 5, expected length of 9

Linked items
0

Link issues together to show that they're related. Learn more.

Activity


Please register or sign in to reply
0 Assignees
None
Assign to
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
Due date
None
None
None
Time tracking
No estimate or time spent
Confidentiality
Not confidential
Not confidential

You are going to turn on confidentiality. Only project members with at least the Reporter role, the author, and assignees can view or be notified about this issue.

Lock issue
Unlocked
0
0 participants
Reference:

Menu

Explore Projects Groups Snippets