Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
/frameworkPublic archive

fix(vite): improve vite-node hmr - #6343

Merged
pi0 merged 6 commits into
mainfrom
fix/vite-node-hmr
Aug 4, 2022
Merged

fix(vite): improve vite-node hmr#6343
pi0 merged 6 commits into
mainfrom
fix/vite-node-hmr

Conversation

@antfu

@antfuantfu commented Aug 4, 2022

Copy link
Copy Markdown
Member

🔗 Linked issue

closenuxt/nuxt#14469

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

This PR implemented the full HMR support of vite-node as mentioned in #6154 (comment)

Re nuxt/nuxt#14469, the bug is caused because in the release build, entry.mjs is laying under node_modules which bypasses the cache clear up due to #6153

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@netlify

netlifyBot commented Aug 4, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commit69a22e5
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/62eb9543212a070008183d0e

Comment threadpackages/vite/src/runtime/vite-node.mjs Outdated
Comment threadpackages/vite/src/runtime/vite-node.mjs Outdated
Comment threadpackages/vite/src/vite-node.ts Outdated
antfuand others added 3 commits August 4, 2022 16:06
Co-authored-by: Damian Głowala <48835293+DamianGlowala@users.noreply.github.com>
Co-authored-by: Damian Głowala <48835293+DamianGlowala@users.noreply.github.com>
Co-authored-by: Damian Głowala <48835293+DamianGlowala@users.noreply.github.com>
@pi0

pi0 commented Aug 4, 2022

Copy link
Copy Markdown
Member

This is nice solution <3

Locally trying on an external project (MacOS), Server HMR seems perfectly working but only we are invalidating some unnecessary chunks. Which could be probably improved later.

image

pi0
pi0 approved these changes Aug 4, 2022
@pi0pi0 changed the title fix(vite-node): improve vite-node HMRfix(vite): improve vite-node hmrAug 4, 2022
@pi0
pi0 merged commit 972f4b4 into mainAug 4, 2022
@pi0
pi0 deleted the fix/vite-node-hmr branch August 4, 2022 10:03
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vite-node server HMR is broken

4 participants

@antfu@pi0@DamianGlowala@danielroe