Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

moment-timezone ECMAScript module #883

Closed
Eraldo opened this issue Aug 9, 2020 · 7 comments
Closed

moment-timezone ECMAScript module #883

Eraldo opened this issue Aug 9, 2020 · 7 comments

Comments

@Eraldo
Copy link

Eraldo commented Aug 9, 2020

I am using moment-timezone in an angular project right now.

I get the following warning/trace:

component.ts depends on 'moment-timezone'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

I search for this warning and found a statement suggesting to prompt the maintainers to feature an ECMAScript module for the dependency in question.

Angular version: 10.0.3

@nealyip
Copy link

nealyip commented Aug 10, 2020

I got this warning message too

@Michael-Ziluck
Copy link

Big +1 from me. I did not realize this was a problem before Angular started warning me about it. Would be nice to get a reply from the maintainers of this project if possible.

@msklvsk
Copy link

msklvsk commented Sep 1, 2020

There was a PR 4yrs ago: #310.
Maintainers’ answer is basically ”Use Luxon.“

@jaequery
Copy link

jaequery commented Sep 4, 2020

man, that is sad ...

@Eraldo
Copy link
Author

Eraldo commented Sep 4, 2020

man, that is sad ...
I agree.

@ricardosaracino
Copy link

if you wind up here might be worth noting how to get rid of the warning

image

@ichernev
Copy link
Contributor

Eh, I guess we could bundle 2 versions of moment(-timezone), one with require and the other with the module syntax, now that this is the de-facto way to ship JS libs. It just felt wrong back in the day when JS folks introduced modules with zero oversight about existing code. When we spend a lot of time about backwards compatibility, supporting shit that is more than 10y old and they just broke the entire ecosystem... it's sad. Move fast and break things, or just break them...

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants