Support sourcemap data pass-through for imported CSS files
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 17k
- Forks
- 3.4k
- Avg merge
- 7h 42m
- Merged PRs (30d)
- 26
Description
I have tried many differents options to import a css file with sourcemaps reference included into my less file but I always loose the sourcemaps.
Less is correctly generating the sourcemaps from css file to less compiled file.
My case :
I am generating somme css files with less (let's call it fileA.less [importing fileA1.less, fileA2.less] which compile to fileA.css and fileA.cass.map)
In another less file in another project I am importing fileA in my fileB :
/*fileB.less content*/
@import "/path/to/my/fileA.css"
fileB.less compile to fileB.css and fileB.css.map but this map only reference fileA.css not the fileA1 and fileA2 import.
I have tried diffrent imports styles but I only get correct sourcemaps when recompiling fileA i.e. importing fileA.less in fileB.less
It would be really helfull if this information wasn't lost..
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
Start by tracing how Less handles an imported CSS file and how it emits the resulting source map. Verify the behavior with a case where fileA.css references fileA1.less and fileA2.less, then consider the work complete when fileB.css.map preserves those original sources instead of only referencing fileA.css.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100