[Feature request] Use sourcemap files from imports
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- build-system
Research direction
Reproduce the multistage build with src/grammar.pegjs, src/grammar.mjs, src/grammar.mjs.map, and src/index.mjs using the two npx commands in the issue. Trace how microbundle handles the imported sourceMappingURL; done means the resultant sourcemap references ../src/grammar.pegjs instead of ../src/grammar.mjs.
Written by the indexing model from the issue text.
Description
Using microbundle@0.15.1
In a multistage build (such as when using peggy), I'd like the final output map file to make use of map files declared by imported files. For example, if I run:
npx peggy --format es --output src/grammar.mjs --source-map src/grammar.mjs.map src/grammar.pegjs
# generates src/grammar.mjs and src/grammar.mjs.map
# src/grammar.mjs ends with `//# sourceMappingURL=grammar.mjs.map`
# src/index.mjs has `import { parse } from "src/grammar.mjs";`
npx microbundle src/index.mjs --compress=false --strict=true --sourcemap=true
I'd expect the resultant sourcemap to contain a reference to `../src/grammar.pegjs". Instead, it contains a reference to "../src/grammar.mjs".
- Dominant language
- JavaScript
- Stars
- 8.1k
- Forks
- 358
- PR merge metrics
- No merged PRs in 30d
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.
More from developit/microbundle
-
CSS
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
developit/microbundle#1002 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
developit/microbundle#789 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
developit/microbundle#1100 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
developit/microbundle#1094 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
developit/microbundle#1093 · 3 comments · 1 reaction ·
All issues in developit/microbundle
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·