Skip to content

Commit 474992a

Browse files
committed
Ensure SWC config respects TS inline source map option
1 parent 9f674cd commit 474992a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/register/read-default-tsconfig.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,16 @@ export function tsCompilerOptionsToSwcConfig(options: ts.CompilerOptions, filena
103103
module: toModule(options.module ?? ts.ModuleKind.ES2015),
104104
target: toTsTarget(options.target ?? ts.ScriptTarget.ES2018),
105105
jsx: isJsx,
106-
sourcemap: options.sourceMap && options.inlineSourceMap ? 'inline' : Boolean(options.sourceMap),
106+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
107+
sourcemap: options.sourceMap || options.inlineSourceMap ? 'inline' : Boolean(options.sourceMap),
107108
experimentalDecorators: options.experimentalDecorators ?? false,
108109
emitDecoratorMetadata: options.emitDecoratorMetadata ?? false,
109110
esModuleInterop: options.esModuleInterop ?? false,
110111
dynamicImport: true,
111112
keepClassNames: true,
112113
externalHelpers: Boolean(options.importHelpers),
113114
react:
115+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
114116
options.jsxFactory || options.jsxFragmentFactory || options.jsx || options.jsxImportSource
115117
? {
116118
pragma: options.jsxFactory,

0 commit comments

Comments
 (0)