-
-
Notifications
You must be signed in to change notification settings - Fork 602
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
Hot Reloading does not work TS + Composition API + Markdown #80
Comments
/cc @danielroe any ideas? 🙈 |
@pi0 @hason At first glance, I think this is an issue with Here's what's happening. The docs for
Because you've hard reloaded the page initially, the value of Obviously we'd prefer to support HMR with UPDATE: Above notwithstanding, to get HMR working with vanilla component syntax you might need to use |
@hason I've just released HMR support for So you'll need to add the below to your component's if (process.env.NODE_ENV === 'development' && process.client) {
window.$nuxt.$on('content:update', async () => {
doc.value = await fetchContent()
})
} Update: updated code above to correct |
...
For others coming here, the above needs to be |
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Version
@nuxt/content: 1.2.0
@nuxt/typescript-runtime: 0.4.8
nuxt-composition-api: 0.8.0
nuxt: 2.12.2
Steps to reproduce
I use nuxt with typescript and composition api:
pages/_slug.vue
:content/index.md
:# Test
What is Expected?
Hot reloading after modify
content/index.md
.What is actually happening?
The text was updated successfully, but these errors were encountered: