File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -30,10 +30,27 @@ function getTSConfig() {
30
30
type TSConfig = ReturnType < typeof getTSConfig > [ "tsConfig" ] ;
31
31
32
32
function esBuildSourceMapOptions ( tsConfig : TSConfig ) {
33
- if ( ! tsConfig . options . sourceMap ) {
33
+ const { sourceMap, inlineSources, inlineSourceMap } = tsConfig . options ;
34
+
35
+ // inlineSources requires either inlineSourceMap or sourceMap
36
+ if ( inlineSources && ! inlineSourceMap && ! sourceMap ) {
34
37
return false ;
35
38
}
36
- return tsConfig . options . inlineSourceMap ? "inline" : "external" ;
39
+
40
+ // Mutually exclusive in tsconfig
41
+ if ( sourceMap && inlineSourceMap ) {
42
+ return false ;
43
+ }
44
+
45
+ if ( ( inlineSources && sourceMap ) || sourceMap ) {
46
+ return "external" ;
47
+ }
48
+
49
+ if ( inlineSourceMap ) {
50
+ return "inline" ;
51
+ }
52
+
53
+ return false ;
37
54
}
38
55
39
56
function getBuildMetadata ( userConfig : Config ) {
You can’t perform that action at this time.
0 commit comments