We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e817531 commit 496f37aCopy full SHA for 496f37a
README.md
@@ -17,6 +17,16 @@ This package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908
17
npm install recursive-readdir-files
18
```
19
20
+If you still want to use in CommonJS, you can use dynamic `import()` to load.
21
+
22
+```typescript
23
+const recursiveReaddirFiles = await import('recursive-readdir-files');
24
25
+// Fix compiling in typescript.
26
+// https://github.com/microsoft/TypeScript/issues/43329#issuecomment-922544562
27
+const { getExt, recursiveReaddirFiles } = await (Function('return import("recursive-readdir-files")')()) as Promise<typeof import("recursive-readdir-files")>;
28
+```
29
30
## Usage
31
32
```js
0 commit comments