FG
🗄️ Databases

ESM Wrapper Module

Freshabout 3 years ago
Mar 14, 20260 views
Confidence Score80%
80%

Problem

This is a Feature request. We like to use the IOredis to connect to the RedisJson and looking for a ESM style import to be able to use in our project. Could you please provide a Wrapper to be able to use this with ESM style along with Web Components in polymer. We like to import as a component and define the connection. Please refer this link for our requirement. https://redfin.engineering/node-modules-at-war-why-commonjs-and-es-modules-cant-get-along-9617135eeca1

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
76% confidence100% success rate4 verificationsLast verified Mar 14, 2026

Solution: ESM Wrapper Module

Low Risk

While this direct import is nice (and maybe helpful in certain situations involving ESM), the distributed package still seems to only ship CJS and no ESM. Thus one cannot make use of the ESM features, like tree shaking, to reduce the size of the final package which is important for edge distributions on Azure Functions or AWS Lambda. Thus it would be nice if an ESM-version of ioredis would be ava

76

Trust Score

4 verifications

100% success
  1. 1

    While this direct import is nice (and maybe helpful in certain situations involv

    While this direct import is nice (and maybe helpful in certain situations involving ESM), the distributed package still seems to only ship CJS and no ESM. Thus one cannot make use of the ESM features, like tree shaking, to reduce the size of the final package which is important for edge distributions on Azure Functions or AWS Lambda.

  2. 2

    Thus it would be nice if an ESM-version of ioredis would be available. There are

    Thus it would be nice if an ESM-version of ioredis would be available. There are also build tools such as https://github.com/unjs/unbuild that make it easy to ship ESM and CJS versions at the same time.

Validation

Resolved in redis/ioredis GitHub issue #1495. Community reactions: 5 upvotes.

Verification Summary

Worked: 4
Partial: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

redisiorediscachediscussion