-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No default export (1.8.4) #480
Comments
try |
It causes webpack error: With 1.8.3 the |
Would you please set up a reproduction repo ? |
This is related to #477. A commonjs-exported module works the same when doing |
@Tvrqvoise Well my fault, I did not realize that added a |
## [1.8.5](v1.8.4...v1.8.5) (2019-02-07) ### Bug Fixes * Add en-gb locale ([#478](#478)) ([508c3a7](508c3a7)) * **module:** transpile everything except ES6 modules in the 'module' entrypoint ([#477](#477)) ([#480](#480)) ([#482](#482)) ([767017d](767017d)) * update customParseFormat plugin support hh:mm ([54947cc](54947cc)), closes [#484](#484) * Update module in package.json ([5c5a7a0](5c5a7a0))
Try hotfix v1.8.5, contains @Tvrqvoise's fix, hope this will help. |
Not works :/ |
Basic code for check the import failure: |
The way around this issue was to do the following: import * as dayjs_ from 'dayjs'; granted the export should be fix so we do not have to do this. |
@petrot thanks |
@petrot I could reproduce this in your test repo, but in a simple TypeScript project I created with dayjs v1.8.5, I don't know much about Angular, and just thought, could this issue related to Angular configuration? Or maybe you could simplify your test repo without using Angular. |
@iamkun 1.8.5 is broken with webpack
you may need to check this webpack/webpack#4742 |
@githoniel yes, and I believe this is a bug in webpack. |
@githoniel #492 I opened a new issue related to this |
@petrot Seems fixed after upgrading dayjs to v1.8.6 in your test repo. |
@iamkun 1.8.6 works well, thank you! |
IMO this shouldn't be closed. Pre-1.8.4 behaviour ( Would you please consider going the extra mile to try and make |
@neemzy I'm sorry that there is some problem from 1.8.0 to 1.8.5, but I think we've fixed it in v1.8.6. |
Hi there, I'm getting the error: "Module '".../angular/node_modules/dayjs/plugin/isBetween"' has no default export. Version: 1.8.14 on Angular CLI 7.3.8. Any solutions or should I do a combination of isBefore and isAfter in the meantime? |
@iamkun Version 1.8.15/1.8.16 on Angular 6.0.8. |
@luvletterldl a test repo, please. |
Yes, I'm getting this. I don't have time to setup a toy repo and everything, but will post some screenshots of what I'm seeing: Using: import * as dayjs_ from 'dayjs';
console.log('daysjs before: ', dayjs)
debugger;
const dayjs = (dayjs_).default || dayjs_;
console.log('daysjs after: ', dayjs)
debugger; I see it's undefined until I apply the The logs in ^ should show that just doing But even when I attempt to use es6 import default approach (e.g. and Personally, I'd reopen this until it's proven to work with Webpack given the popularity of that bundler but up to maintainer of course ;) For now, we'll all have imports with comments pointing to this issue |
## [1.8.5](iamkun/dayjs@v1.8.4...v1.8.5) (2019-02-07) ### Bug Fixes * Add en-gb locale ([#478](iamkun/dayjs#478)) ([508c3a7](iamkun/dayjs@508c3a7)) * **module:** transpile everything except ES6 modules in the 'module' entrypoint ([#477](iamkun/dayjs#477)) ([#480](iamkun/dayjs#480)) ([#482](iamkun/dayjs#482)) ([767017d](iamkun/dayjs@767017d)) * update customParseFormat plugin support hh:mm ([54947cc](iamkun/dayjs@54947cc)), closes [#484](iamkun/dayjs#484) * Update module in package.json ([5c5a7a0](iamkun/dayjs@5c5a7a0))
## [1.8.5](iamkun/dayjs@v1.8.4...v1.8.5) (2019-02-07) ### Bug Fixes * Add en-gb locale ([#478](iamkun/dayjs#478)) ([508c3a7](iamkun/dayjs@508c3a7)) * **module:** transpile everything except ES6 modules in the 'module' entrypoint ([#477](iamkun/dayjs#477)) ([#480](iamkun/dayjs#480)) ([#482](iamkun/dayjs#482)) ([767017d](iamkun/dayjs@767017d)) * update customParseFormat plugin support hh:mm ([54947cc](iamkun/dayjs@54947cc)), closes [#484](iamkun/dayjs#484) * Update module in package.json ([5c5a7a0](iamkun/dayjs@5c5a7a0))
## [1.8.5](iamkun/dayjs@v1.8.4...v1.8.5) (2019-02-07) ### Bug Fixes * Add en-gb locale ([#478](iamkun/dayjs#478)) ([508c3a7](iamkun/dayjs@508c3a7)) * **module:** transpile everything except ES6 modules in the 'module' entrypoint ([#477](iamkun/dayjs#477)) ([#480](iamkun/dayjs#480)) ([#482](iamkun/dayjs#482)) ([767017d](iamkun/dayjs@767017d)) * update customParseFormat plugin support hh:mm ([54947cc](iamkun/dayjs@54947cc)), closes [#484](iamkun/dayjs#484) * Update module in package.json ([5c5a7a0](iamkun/dayjs@5c5a7a0))
With v1.8.4 I got the following error:
import dayjs from 'dayjs';
Module '".../node_modules/dayjs/index"' has no default export.
The text was updated successfully, but these errors were encountered: