fix: isDayjs import usage for ESM#2924
Merged
arnautov-anton merged 2 commits intoGetStream:masterfrom Jan 30, 2026
Merged
Conversation
Contributor
|
Hey, @goldenratio, the change seems reasonable enough to me so I think we can merge and release afterwards. Thank you for your contribution! π |
arnautov-anton
approved these changes
Jan 30, 2026
arnautov-anton
added a commit
that referenced
this pull request
Jan 30, 2026
### π― Goal
_Describe why we are making this change_
recently we moved our stack to ESM (micro frontends, uses import maps).
Noticed we are getting below error in the micro-frontend that uses
`stream-chat-react`,
```
Failed to load module mfe-chat SyntaxError: The requested module 'dayjs' does not provide an export named 'isDayjs' (at index.umd-ce148d01.js:18:14)
```
on further investigation, found:
- `isDayjs` is actually not exported in `dayjs` esm build. It needs to
be accessed to through `dayjs` instance.
- We are using importmap (esm), to satisfy `dayjs` dependency, this
fails because of improper import of `isDayjs`
simply create `index.html`, with below code and run it
**this will fail,**
```html
<script type="module">
import { isDayjs } from "https://cdn.jsdelivr.net/npm/dayjs@1.10.4/+esm";
console.log(isDayjs);
</script>
```
**this will pass,**
```html
<script type="module">
import Dayjs from "https://cdn.jsdelivr.net/npm/dayjs@1.10.4/+esm";
console.log(Dayjs.isDayjs);
</script>
```
related ticket in dayjs, iamkun/dayjs#1306
### π Implementation details
_Provide a description of the implementation_
- fix import usage
### π¨ UI Changes
_Add relevant screenshots_
Co-authored-by: Anton Arnautov <43254280+arnautov-anton@users.noreply.github.com>
github-actions bot
pushed a commit
that referenced
this pull request
Jan 30, 2026
## [13.13.6](v13.13.5...v13.13.6) (2026-01-30) ### Bug Fixes * isDayjs import usage for ESM ([#2924](#2924)) ([009a732](009a732))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
π― Goal
Describe why we are making this change
recently we moved our stack to ESM (micro frontends, uses import maps). Noticed we are getting below error in the micro-frontend that uses
stream-chat-react,on further investigation, found:
isDayjsis actually not exported indayjsesm build. It needs to be accessed to throughdayjsinstance.dayjsdependency, this fails because of improper import ofisDayjssimply create
index.html, with below code and run itthis will fail,
this will pass,
related ticket in dayjs, iamkun/dayjs#1306
π Implementation details
Provide a description of the implementation
π¨ UI Changes
Add relevant screenshots