mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Fix default behavior for transpileModule when fileName not provided (#32982)
This commit is contained in:
@@ -66,7 +66,7 @@ namespace ts {
|
||||
options.noResolve = true;
|
||||
|
||||
// if jsx is specified then treat file as .tsx
|
||||
const inputFileName = transpileOptions.fileName || (options.jsx ? "module.tsx" : "module.ts");
|
||||
const inputFileName = transpileOptions.fileName || (transpileOptions.compilerOptions && transpileOptions.compilerOptions.jsx ? "module.tsx" : "module.ts");
|
||||
const sourceFile = createSourceFile(inputFileName, input, options.target!); // TODO: GH#18217
|
||||
if (transpileOptions.moduleName) {
|
||||
sourceFile.moduleName = transpileOptions.moduleName;
|
||||
|
||||
Reference in New Issue
Block a user