Skip to content

Commit

Permalink
doc: Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Apr 7, 2022
1 parent e817531 commit 496f37a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ This package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908
npm install recursive-readdir-files
```

If you still want to use in CommonJS, you can use dynamic `import()` to load.

```typescript
const recursiveReaddirFiles = await import('recursive-readdir-files');

// Fix compiling in typescript.
// https://github.com/microsoft/TypeScript/issues/43329#issuecomment-922544562
const { getExt, recursiveReaddirFiles } = await (Function('return import("recursive-readdir-files")')()) as Promise<typeof import("recursive-readdir-files")>;
```

## Usage

```js
Expand Down

0 comments on commit 496f37a

Please sign in to comment.