Skip to content

Commit 22d8345

Browse files
committed
use this.addWatchFile when present
1 parent f68fd5a commit 22d8345

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,11 @@ module.exports = function svelte(options = {}) {
245245
cssLookup.set(fname, compiled.css);
246246
}
247247

248-
compiled.js.dependencies = dependencies;
248+
if (this.addWatchFile) {
249+
dependencies.forEach(dependency => this.addWatchFile(dependency));
250+
} else {
251+
compiled.js.dependencies = dependencies;
252+
}
249253

250254
return compiled.js;
251255
});

0 commit comments

Comments
 (0)