Skip to content

Commit 3486af5

Browse files
committed
Fix commonjs loadinfg
1 parent a407818 commit 3486af5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/rotten-suns-reply.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@react-docgen/cli': patch
3+
---
4+
5+
Fix bug with loading CommonJS files

packages/react-docgen-cli/src/utils/importFile.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default async function importFile<T>(
1313
pathToFileURL(require.resolve(importSpecifier, resolveOptions)).href
1414
);
1515

16-
return importedFile.default ? importedFile.default : importFile;
16+
return importedFile.default ? importedFile.default : importedFile;
1717
} catch (error) {
1818
if (
1919
error instanceof Error &&

0 commit comments

Comments
 (0)