Skip to content

Commit

Permalink
support non-css svelte/vue builds on watch
Browse files Browse the repository at this point in the history
  • Loading branch information
FredKSchott committed Mar 14, 2021
1 parent 97f408e commit e9dfbac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion snowpack/src/commands/build.ts
Expand Up @@ -222,7 +222,11 @@ export async function build(commandOptions: CommandOptions): Promise<SnowpackBui
let onFileChangeCallback: OnFileChangeCallback = () => {};
devServer.onFileChange(async ({filePath}) => {
// First, do our own re-build logic
allFileUrlsToProcess.push(...getUrlsForFile(filePath, config)!);
const fileUrls = getUrlsForFile(filePath, config);
if (!fileUrls || fileUrls.length === 0) {
return;
}
allFileUrlsToProcess.push(fileUrls[0]);
await flushFileQueue(false, {
isSSR,
isHMR,
Expand Down

0 comments on commit e9dfbac

Please sign in to comment.