Skip to content
This repository has been archived by the owner on Jan 26, 2023. It is now read-only.

Nuxt doesn't create new global models hydration state, on hot-reload changes #117

Open
h2xd opened this issue Nov 3, 2020 · 0 comments
Open

Comments

@h2xd
Copy link

h2xd commented Nov 3, 2020

Hi there! :)

We've added global models to vue-states in our Nuxt application.
But for some reason the hydration state doesn't get recompiled (on hot-reload),
when we change the mentioned global models.

Instead, we need to restart the development server on each change,
which leads to a slow development process and funny/unnecessary conversations
with other developers.

Here is our plugin implementation:

import Vue from 'vue'
import Authentication from '../models/authentication'
import User from '../models/user'

Vue.use(VueStates, {
  globalModels: {
    Authentication,
    User,
  }
})

// ... further plugin implementation

Hit me up, if you need further details.

Cheers,
Andrej :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant