iamkun / iamkun/dayjs

export = locale in index.d.ts doesnt allow synthetic import

Open
#2,189 18 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
When I want to import dayjs as synthetic import in my lib, I get the following error :

export = dayjs;
~~~~~~~~~~~~~~~
This module is declared with using 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag

**Expected behavior**
Application can build with this line : "import dayjs from 'dayjs';"

**Information**
- Day.js Version [e.g. v1.11.7]
- OS: [Windows]
- Browser: Chrome 108
- Time zone: GMT +1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.