Skip to content

Commit

Permalink
fix: fix the issue that make hmr not working correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Clarkkkk committed Oct 31, 2023
1 parent 5120aba commit 0f1af65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -17,6 +17,7 @@
"play": "nuxi dev playground",
"play:build": "nuxi build playground",
"play:preview": "nuxi preview playground",
"fixtures:basic:dev": "nuxi dev test/fixtures/basic",
"test": "pnpm test:fixtures && pnpm test:fixtures:dev && pnpm test:fixtures:webpack && pnpm test:unit && pnpm test:runtime && pnpm test:types && pnpm typecheck",
"test:fixtures": "nuxi prepare test/fixtures/basic && nuxi prepare test/fixtures/runtime-compiler && vitest run --dir test",
"test:fixtures:dev": "TEST_ENV=dev pnpm test:fixtures",
Expand Down
2 changes: 2 additions & 0 deletions packages/nuxt/src/pages/runtime/page.ts
Expand Up @@ -122,6 +122,8 @@ export default defineComponent({
)
))

;(vnode.type as any).__hmrId = (componentVNode.type as any).__hmrId

return vnode
}
})
Expand Down

0 comments on commit 0f1af65

Please sign in to comment.