Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Commit

Permalink
feat: add watchers to imports within vue files (#385)
Browse files Browse the repository at this point in the history
the watcher should rebuild vue files when the file's imports are updated

Co-authored-by: Rahul Kadyan <hi@znck.me>
  • Loading branch information
neryams and znck committed Oct 22, 2020
1 parent 6eb9f4c commit cd41410
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.ts
Expand Up @@ -143,6 +143,10 @@ export default function PluginVue(userOptions: Partial<Options> = {}): Plugin {

const descriptor = getDescriptor(query.filename)
const hasScoped = descriptor.styles.some((s) => s.scoped)
if (query.src) {
this.addWatchFile(query.filename);
}

if (query.type === 'template') {
debug(`transform(${id})`)
const block = descriptor.template!
Expand Down

0 comments on commit cd41410

Please sign in to comment.