When using --source-map assets in `../` are getting full paths
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 17k
- Forks
- 3.4k
- Avg merge
- 7h 42m
- Merged PRs (30d)
- 26
Description
So I'm using --source-map and no matter what I do for basepath or rootpath if I have an asset imported via ../sibling/whatever.css it instead outputs the full path in the map:
so
../components/bootstrap/less/normalize.less
becomes
/Users/Dean/Sites/paxata/frontend/src/main/webapp/components/bootstrap/less/normalize.less
in my map file. I have 0 idea how to fix this. This is my command I'm using:
lessc -ru -x --source-map style/paxata.less style/paxata.min.css
where some libraries are located in /components (bower components) and others are located inside /style
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 issue with the shown lessc command, --source-map, and an asset imported through ../sibling/whatever.css. Inspect how source-map paths are generated for assets in /components and /style; done means the map preserves usable relative paths instead of exposing the full local filesystem path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100