Currently, the swc-node/register package does not respect the inlineSourceMap option from tsconfig. When inlineSourceMap is set to true, swc/register does not generate inline source maps. The issue is within the tsCompilerOptionsToSwcConfig function, where it only sets sourcemap property on the return object to true if the TS config sourceMap property is true, regardless of the inlineSourceMap property.
Currently, the
swc-node/register
package does not respect theinlineSourceMap
option fromtsconfig
. WheninlineSourceMap
is set totrue
,swc/register
does not generate inline source maps. The issue is within thetsCompilerOptionsToSwcConfig
function, where it only setssourcemap
property on the return object totrue
if the TS configsourceMap
property istrue
, regardless of theinlineSourceMap
property.Also, per TS Config documentation (https://www.typescriptlang.org/tsconfig#inlineSourceMap),
inlineSourceMap
andsourcemap
are mutually exclusive, therefore, both cannot be set totrue
.This PR addresses this issue by checking for both of these TS config properties separately.