Skip to content

Commit

Permalink
fix: support export async function (#61)
Browse files Browse the repository at this point in the history
Co-authored-by: Simen Berge <sib@Simens-MacBook-Pro-2.local>
  • Loading branch information
egreb and Simen Berge authored Mar 1, 2023
1 parent a76c8df commit c922b59
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shared/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ const getRouteId = (path: string) => path.replace(...patterns.route).replace(/\W

const getRouteExports = (content: string) => ({
default: /^export\s+default\s/gm.test(content),
loader: /^export\s+(const|function|let)\s+Loader\W/gm.test(content),
action: /^export\s+(const|function|let)\s+Action\W/gm.test(content),
pending: /^export\s+(const|function|let)\s+Pending\W/gm.test(content),
loader: /^export\s+(const|function|async function|let)\s+Loader\W/gm.test(content),
action: /^export\s+(const|function|async function|let)\s+Action\W/gm.test(content),
pending: /^export\s+(const|function|async function|let)\s+Pending\W/gm.test(content),
catch_: /^export\s+(const|function|let)\s+Catch\W/gm.test(content),
})

Expand Down

0 comments on commit c922b59

Please sign in to comment.