Skip to content

Commit

Permalink
fix(prisma): add useDefineForClassFields option to default ts compila…
Browse files Browse the repository at this point in the history
…tion option

Closes: #2927
  • Loading branch information
semantic-release-bot authored and Romakita committed Dec 9, 2024
1 parent a5c2cfb commit 7a1ebd6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/orm/prisma/src/generator/generateCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ const baseCompilerOptions: CompilerOptions = {
module: ModuleKind.ESNext,
emitDecoratorMetadata: true,
experimentalDecorators: true,
esModuleInterop: true
esModuleInterop: true,
useDefineForClassFields: false
};

export interface GenerateCodeOptions {
Expand All @@ -31,7 +32,9 @@ export async function generateCode(dmmf: DMMF.Document, options: GenerateCodeOpt
const project = new Project({
compilerOptions: {
...baseCompilerOptions,
...(emitTranspiledCode && {declaration: true})
...(emitTranspiledCode && {
declaration: true
})
}
});

Expand Down

0 comments on commit 7a1ebd6

Please sign in to comment.