madyankin / madyankin/postcss-modules
Options.getJSON is not executed in a .css file that contains the same styles as another .css file
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.6k
- Forks
- 88
- PR merge metrics
- No merged PRs in 30d
Description
My project has the following structure:
- components/
index.css- header/
index.css- B2B/
index.css- shared/
- menu/
index.css- subcomponents/
subMenuList.module.css
menuList.module.css
- subcomponents/
- menu/
- shared/
- B2B/
index.css- shared/
- menu/
index.css- subcomponents/
subMenuList.module.css
menuList.module.css
- subcomponents/
- menu/
- shared/
- B2B/
- header/
For specific project reasons, the subMenu List.module.css file (B2B and B2C) contains styles that are identical to each other. The menuList.module.css file contains a slight variation: color: var(--primary-color) and color: var(--secondary-color).
In the build, getJSON passes through the components/header/B2C/shared/menu/subcomponents/subMenuList.module.css file, but not through components/header/B2B/shared/menu/subcomponents/subMenuList.module.css. This same behavior does not happen with components/header/[B2C|B2B]/shared/menu/subcomponents/menuList.module.css, the behavior I expect from all files. Is this a desired behavior for the build process or is it a bug?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report with the duplicated B2B and B2C CSS paths, especially subMenuList.module.css and menuList.module.css. Trace when Options.getJSON is invoked for each file and compare the build behavior. Done means the intended handling of identical CSS modules is established and covered by a regression check or clearly documented as expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100