Skip to content
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

Remove node_modules from compiled version #187

Merged
merged 1 commit into from
Jan 23, 2018
Merged

Conversation

wachri
Copy link

@wachri wachri commented Jan 22, 2018

The compiled version, which is pushed to npm, contains a bundled version of moment, which makes it impossible to set the local from outside with

import * as moment  from 'moment';
moment.locale('de');

because the internal moment version is not identical with the version you import from else where (see #149).

To fix that problem I remove the node_modules folder from the compiled version. A little disadvantage is that you have to specify moment in you project package.json as dependencies which means probably an breaking change.

@wachri wachri changed the title Remove node_modules from compield version Remove node_modules from compiled version Jan 22, 2018
@urish urish merged commit 46f2885 into urish:master Jan 23, 2018
@urish
Copy link
Owner

urish commented Jan 23, 2018

Thank you!

@dgsqrs
Copy link

dgsqrs commented Jan 29, 2018

Hi there.
Before 1.8.0, I was using :
import * as moment from 'moment'; moment.locale('fr');
Now this is not working any more, and I have to use the amLocale pipe. Is it possible globally the locale for my app ? thanks !!

@wachri
Copy link
Author

wachri commented Jan 30, 2018

@dgsqrs You have to import fr with import 'moment/locale/fr'; before you can use it. Hope it will help :)

@wachri wachri mentioned this pull request May 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants