Skip to content

Commit

Permalink
add absolute file prefix for dynamic imports (#815)
Browse files Browse the repository at this point in the history
* add absolute file prefix

* run on macos

* run on macos

* restore PR action

Co-authored-by: Robert Kiel <[email protected]>
  • Loading branch information
Robert Kiel and Robert Kiel authored Jun 20, 2022
1 parent ae48d53 commit c34f542
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/openapi-framework/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export default class OpenAPIFramework implements IOpenAPIFramework {
// as `default` property
// - file is a ECMAScript module, and `export default` appears
// at top-level
const imported = await import(fsRoutesItem.path);
const imported = await import(`file://${fsRoutesItem.path}`);
return {
path: fsRoutesItem.route,
module: imported.default ?? imported,
Expand Down

0 comments on commit c34f542

Please sign in to comment.