Add Source Map sourceRoot Support (#1028)

This commit is contained in:
Justin Ridgewell
2021-03-25 02:49:25 -04:00
committed by GitHub
parent 203b0c83d2
commit d57cb4640a
9 changed files with 52 additions and 0 deletions

View File

@@ -159,6 +159,14 @@ func parseOptionsImpl(
}
hasBareSourceMapFlag = false
case strings.HasPrefix(arg, "--source-root="):
sourceRoot := arg[len("--source-root="):]
if buildOpts != nil {
buildOpts.SourceRoot = sourceRoot
} else {
transformOpts.SourceRoot = sourceRoot
}
case strings.HasPrefix(arg, "--sources-content="):
value := arg[len("--sources-content="):]
var sourcesContent api.SourcesContent