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

Commit cd41410

Browse files
neryamsznck
andauthored
feat: add watchers to imports within vue files (#385)
the watcher should rebuild vue files when the file's imports are updated Co-authored-by: Rahul Kadyan <hi@znck.me>
1 parent 6eb9f4c commit cd41410

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: src/index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ export default function PluginVue(userOptions: Partial<Options> = {}): Plugin {
143143

144144
const descriptor = getDescriptor(query.filename)
145145
const hasScoped = descriptor.styles.some((s) => s.scoped)
146+
if (query.src) {
147+
this.addWatchFile(query.filename);
148+
}
149+
146150
if (query.type === 'template') {
147151
debug(`transform(${id})`)
148152
const block = descriptor.template!

0 commit comments

Comments
 (0)