Skip to content

Commit

Permalink
html files should always trigger a full page reload
Browse files Browse the repository at this point in the history
  • Loading branch information
FredKSchott committed Jun 9, 2020
1 parent f2c7246 commit 97f6c1f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/commands/dev.ts
Expand Up @@ -834,6 +834,13 @@ export async function command(commandOptions: CommandOptions) {
// If no entry exists, file has never been loaded, safe to ignore
if (hmrEngine.getEntry(updateUrl)) {
updateOrBubble(updateUrl, new Set());
return;
}
// HTML files don't support HMR, so just reload the current page
// NOTE: .html.proxy.js should be .html, but we naively add proxy.js above
if (updateUrl.endsWith('.html.proxy.js')) {
hmrEngine.broadcastMessage({type: 'reload'});
return;
}
}
inMemoryBuildCache.delete(fileLoc);
Expand Down

0 comments on commit 97f6c1f

Please sign in to comment.