Skip to content

Commit 89d761c

Browse files
committed
fix error transpiling referenced javascript files
When referencing a .js from .ts: // service.ts import User from './user.js'; This error will occur: error TS5055: Cannot write file './user.js' because it would overwrite input file.
1 parent 1f172f0 commit 89d761c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/typescript-preprocessor.js

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class TypeScriptPreprocessor {
2020
// includes, always emit, and let Broccoli manage any outDir.
2121
this.config = JSON.parse(fs.readFileSync(path.join(process.cwd(), 'tsconfig.json')));
2222
this.config.compilerOptions.noEmit = false;
23+
this.config.compilerOptions.allowJs = false;
2324
delete this.config.compilerOptions.outDir;
2425
delete this.config.include;
2526
}

0 commit comments

Comments
 (0)