Skip to content

Commit

Permalink
fix: invalidate type cache on file removal
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Apr 18, 2023
1 parent 334004b commit e8cc64b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/plugin-vue/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin {

configureServer(server) {
options.devServer = server
if (options.compiler.invalidateTypeCache) {
server.watcher.on('unlink', (file) => {
options.compiler.invalidateTypeCache(file)
})
}
},

buildStart() {
Expand Down

0 comments on commit e8cc64b

Please sign in to comment.