vitejs / vite-plugin-vue

Vite Vue Plugins
MIT License
500 stars 154 forks source link

fix(hmr): re-resolve script after type dep changed #446

Closed edison1105 closed 1 week ago

edison1105 commented 2 months ago

Description

close #423

use resolveScript instead of getResolvedScript to compileScript if cache is not found because the script cache will be removed when the imported type is changed. https://github.com/vitejs/vite-plugin-vue/blob/2eac3b01a10225b9a476907d6d188309a6eb13bb/packages/plugin-vue/src/handleHotUpdate.ts#L349-L351

Additional context


What is the purpose of this pull request?

Before submitting the PR, please make sure you do the following

pkg-pr-new[bot] commented 2 months ago

Open in Stackblitz

pnpm add https://pkg.pr.new/@vitejs/plugin-vue@446
pnpm add https://pkg.pr.new/@vitejs/plugin-vue-jsx@446

commit: c3d1ca0

ccf-zeno commented 1 month ago

什么时候能合入啊,急得不行,这个太影响使用了 @sxzz

sxzz commented 1 month ago

Then why not try pkg-pr-new? https://github.com/vitejs/vite-plugin-vue/pull/446#issuecomment-2360600949