Skip to content

Commit

Permalink
fix: esModuleInterop
Browse files Browse the repository at this point in the history
close #1
  • Loading branch information
skarab42 committed Jul 18, 2022
1 parent 409bcc0 commit fba3113
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/typescript/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createError, ErrorCode } from '../common/error';
import type { CompilerSettings, Compiler } from './types';

export function createCompiler({ fileName, config }: CompilerSettings): Compiler {
const compilerOptions = { ...ts.getDefaultCompilerOptions(), ...config.options };
const compilerOptions = { ...ts.getDefaultCompilerOptions(), ...config.options, esModuleInterop: true };
const program = ts.createProgram([fileName], compilerOptions);
const diagnostics = ts.getPreEmitDiagnostics(program) as ts.Diagnostic[];
const sourceFile = program.getSourceFile(fileName);
Expand Down

0 comments on commit fba3113

Please sign in to comment.