Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Duplicate moment instances when using moment.js in the project.

See original GitHub issue

I have a project in which I use moment.js and vue-moment, I found out that vue-moment requires moment again in it’s own package in node_modules. In that way we have a duplicate resources.

I understand that this is required in case one does not use moment.js in the first place. But in my case it’s really important to me to reduce the build size.

Is there any way to make vue-moment use the same moment resource I use?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

BrockReececommented, Feb 7, 2018

I have released this change in v3.2.0

brockpetriecommented, Feb 6, 2018

I went ahead and merged since it seemed to do the trick for me locally. Can revisit if further testing shows otherwise!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Moment Clone -
All moments are mutable. If you want a clone of a moment, you can do so implicitly or explicitly. Calling moment() on a...
Read more >
Moment.js moment.duration().clone() Method - GeeksforGeeks
The moment().duration().clone() Method is used to clone the given Duration object. As the Duration object is mutable, it can be used to save...
Read more >
MomentJS - Moment Clone - Tutorialspoint
Moment Clone will create a copy of the moment created. Syntax. moment(Moment);. There are 2 ways to clone a moment. Observe the following...
Read more >
Clone moment js object - Stack Overflow
moment.js has its own api for cloning moment object. var copy ... It's also possible to copy a moment object through it's constructor....
Read more >
Multiple copies of moment function · Issue #2615 - GitHub
Is there a way to create multiple, independently-configured copies of the moment() function? What I would like to do is enforce strict-mode ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found