Skip to content

Commit

Permalink
feat: support cjs files
Browse files Browse the repository at this point in the history
  • Loading branch information
dadamssg committed Mar 8, 2023
1 parent 586c667 commit 08018b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api-route-provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,10 @@ function getFileRoutes (options) {
})
}
if (options.routes) {
routes = routes.concat(filesToRoutes(glob.sync(`${options.routes}/**/*.+(js|json)`)))
routes = routes.concat(filesToRoutes(glob.sync(`${options.routes}/**/*.+(js|json|cjs)`)))
}
if (src && srcDir) {
routes = routes.concat(filesToRoutes(glob.sync(`${src}/**/${srcDir}/**/*.+(js|json)`)))
routes = routes.concat(filesToRoutes(glob.sync(`${src}/**/${srcDir}/**/*.+(js|json|cjs)`)))
}
return routes
}
Expand Down

0 comments on commit 08018b3

Please sign in to comment.