From 31c0cf442aff764e4da35e25bbcb8398fbd3d1bf Mon Sep 17 00:00:00 2001 From: Raymon Ohmori Date: Mon, 31 Aug 2020 13:55:13 -0400 Subject: [PATCH] add watchers to imports within vue files the watcher should rebuild vue files when the file's imports are updated --- src/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.ts b/src/index.ts index 81a02db..36ae5f9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -143,6 +143,10 @@ export default function PluginVue(userOptions: Partial = {}): 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!