Created
June 20, 2017 04:28
-
-
Save vuejsdevelopers/d3e63d0b2146435e405baeaf33c1be9a to your computer and use it in GitHub Desktop.
Use Any Javascript Library With Vue.js - Snippet 04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import moment from 'moment'; | |
Object.definePrototype(Vue.prototype, '$moment', { value: moment }); |
Think this should be
Object.defineProperty
? I could well be wrong but am getting an error when I try it as it is at the moment?
👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Think this should be
Object.defineProperty
? I could well be wrong but am getting an error when I try it as it is at the moment?