Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide tree depth on the LoaderContext while loading sourcemaps
It's important to know both the importer and the depth of the sourcemap tree when loading, to solve cases like babel/babel#14274. Here, a parent sourcemap contains a source location that, when resolved, has the same location as the parent. This easily happens when the file represents an in-place transformation of the original sourcemap (eg, `babel script.js --out-file script.js --source-maps`). Because they exist in the same location, it's extremely easy to create a loader which continues to return the transformed sourcemap when we intend to only return a `null` (no sourcemap) for the original source file.
- Loading branch information
1 parent
13c136f
commit 43f275f
Showing
4 changed files
with
100 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters