Less file not listed in sources sourcemap array if it contains only variables
Open
Nobody has claimed this yet.
feature request
low priority
- Dominant language
- JavaScript
- Stars
- 17k
- Forks
- 3.4k
- Avg merge
- 7h 42m
- Merged PRs (30d)
- 26
Description
If I import a less file that only includes variables then it does not get included in sources. Here's an example, notice that the map file at the end does not include variables.less as a source.
main.less
@import "variables.less";
a { color: @theme-primary; }
variables.less
@theme-primary: #2C3E50;
main.css.map
{
"version":3,
"sources":["/less/main.less"],
"names":[],
"mappings":"AAGA;EACC,…"
}
Contributor guide
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 example using main.less, variables.less, and main.css.map, then trace the sourcemap generation for imports containing only variables. Confirm the fix by adding or updating a regression test so variables.less appears in the map's sources array without changing the generated CSS.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100