Skip to content

Commit

Permalink
fix(hmr): avoid relying on revertd vite hmr behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Nov 5, 2021
1 parent 773472d commit 4114674
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/node/plugin.ts
Expand Up @@ -266,11 +266,8 @@ export function createVitePressPlugin(
}
})

// reload the content component
return vuePlugin.handleHotUpdate!({
...ctx,
read: () => vueSrc
})
// overwrite src so vue plugin can handle the HMR
ctx.read = () => vueSrc
}
}
}
Expand Down

0 comments on commit 4114674

Please sign in to comment.