Skip to content

Commit

Permalink
fix(esm): change require to import
Browse files Browse the repository at this point in the history
  • Loading branch information
MickVanDuijn committed May 12, 2023
1 parent 4781c5d commit a18dd61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/compile/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export async function handler(argv: ReturnType<typeof builder>['argv']): Promise
file = path.join(process.cwd(), file)
}

// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires
const { [input.export]: definition } = require(file)
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const { [input.export]: definition } = await import(file)
const lambdaArns = [...listLambdaArns(definition as StateMachine)].sort()
console.log(
JSON.stringify({
Expand Down

0 comments on commit a18dd61

Please sign in to comment.