Imported dependancies loaded more than once causing redundant styles.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 12
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
I would have expected the tool to manage less files that are imported by several different modules so that a particular less module would only be loaded once.
For instance: I have two components say fooView.js and barView.js. They both have corresponding .less files. Each one of those less files depends on fonts.less and so it is imported in both. Now the CSS from fonts.less is in two separate style tags in the DOM.
Is this expected, or am I doing something wrong?
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 case using fooView.js and barView.js, whose corresponding .less files both import fonts.less, then inspect the generated style tags in the DOM. Read the import handling around these files and determine whether fonts.less is emitted more than once; done means its CSS is emitted only once when shared by both modules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, tooling
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100