Skip to content

Commit

Permalink
docs: update instructions for ESM module
Browse files Browse the repository at this point in the history
Closes #1632
  • Loading branch information
luin authored Aug 9, 2022
1 parent 3a4c7f9 commit adbd103
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ npm install --save-dev @types/node
```javascript
// Import ioredis.
// You can also use `import Redis from "ioredis"`
// if your project is an ESM module or a TypeScript project.
// if your project is a TypeScript project,
// or `import { default as Redis } from "ioredis"`
// if it is an ESM module.
const Redis = require("ioredis");

// Create a Redis instance.
Expand Down

0 comments on commit adbd103

Please sign in to comment.