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
vue-moment + nuxt (webpack) #44
Comments
+1 without nuxt |
Here's the moment issue: moment/moment#4216 EDIT: Might be more elegant to just downgrade for now, here's what I did I made a pull request here to fix it for now, but might not be necessary if moment.js fixes it first: #45
|
The moment.js guys just pushed a new build (moment/moment@29afed6) that seems to solves the |
For anyone wanting to use nuxt
plugins/moment-filters.js
|
@blowsie thanks for your input but I'm not sure this is relevant to the thread. And I have been using this library with Nuxt without issue, what does your configuration solve? import Vue from 'vue'
import VueMoment from 'vue-moment'
Vue.use(VueMoment) |
@BrockReece in your example the instance of moment is not available in nuxt context such as |
Ok, I see, would something like this work? import Vue from 'vue'
import VueMoment from 'vue-moment'
export default ({ app }) => {
Vue.use(VueMoment)
app.$moment = Vue.moment
}) Just to clarify though, is your solution is to add the code from the |
Yes because other wise the following code from vue-moment will throw errors.
|
It looks like the most recent release of moment 2.19.0 has caused issues with vue-moment and webpack...
[web - 93095]: WARNING Compiled with 1 warnings4:56:47 PM
[web - 93095]: This relative module was not found:
[web - 93095]: * ./locale in ./node_modules/moment/src/lib/locale/locales.js
Does anyone have a workaround for this?
The text was updated successfully, but these errors were encountered: