File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { isAbsolute, join } from "path/mod.ts";
3
3
import { RenderResult } from "../../command/render/types.ts" ;
4
4
import { md5Hash } from "../../core/hash.ts" ;
5
5
import { isJupyterNotebook } from "../../core/jupyter/jupyter.ts" ;
6
+ import { isHtmlContent } from "../../core/mime.ts" ;
6
7
import { PromiseQueue } from "../../core/promise.ts" ;
7
8
import { projectOutputDir } from "../project-shared.ts" ;
8
9
import { ProjectContext } from "../types.ts" ;
@@ -74,8 +75,9 @@ export class ServeRenderManager {
74
75
} , "" ) ;
75
76
// very large jupyter notebooks can take a long time to hash
76
77
// (~ 2 seconds for every 10mb) so we use the slightly less
77
- // robust file modification time in that case
78
- if ( isJupyterNotebook ( inputFile ) ) {
78
+ // robust file modification time in that case. non-html
79
+ // content also shouldn't be read with readTextFileSync
80
+ if ( isJupyterNotebook ( inputFile ) || ! isHtmlContent ( file ) ) {
79
81
return String ( Deno . statSync ( file ) . mtime ) +
80
82
String ( Deno . statSync ( inputFile ) . mtime ) +
81
83
resourceHash ;
You can’t perform that action at this time.
0 commit comments