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
moment has no default member #4397
Comments
RTFM 😂
|
Is there a chance that this will be resolved in a way where By not requiring this setting, you allow |
Just chiming in here that this is a really, truly, obnoxious problem. Since moment has chosen not to respect the official spec, it means that some libraries pull in via There's a reason that spec's exist, ans that's to create consistency. Is there no way that moment could have a moment-es variant or something which can be properly imported, so that way people that want to follow the spec can just follow the spec, allowing the JS toolchain to work as expected, rather than all the hacks? |
+1 |
Description of the Issue and Steps to Reproduce:
Trying to implement instance locale in typescript project
https://momentjs.com/docs/#/i18n/instance-locale/
but when I
import moment from 'moment'
I get error:moment has no default export
purpose:
I need custom forms (shorten, like 'sec' instead 'seconds') of humanized strings in some parts of application, so I would like to use two locales in one view.
Environment:
typescript project
Other information that may be helpful:
TypeScript, Angular4
If you are reporting an issue, please run the following code in the environment you are using and include the output:
I would like to prevent the
import * as moment from 'moment';
solution since it blocks three shaking in bundlingMany thanks! :)
The text was updated successfully, but these errors were encountered: