Skip to content

Commit

Permalink
ugh
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Jul 23, 2022
1 parent d4ad4dc commit 3063d4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/kit/src/core/prerender/prerender.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { readFileSync, writeFileSync } from 'fs';
import { existsSync, readFileSync, writeFileSync } from 'fs';
import { dirname, join } from 'path';
import { pathToFileURL, URL } from 'url';
import { mkdirp, posixify, walk } from '../../utils/filesystem.js';
Expand Down Expand Up @@ -160,7 +160,7 @@ export async function prerender({ config, client_out_dir, manifest_path, log })

const files = new Set([
...walk(client_out_dir).map(posixify),
...walk(config.files.assets).map(posixify) // TODO remove this if we use Vite publicDir option
...(existsSync(config.files.assets) ? walk(config.files.assets).map(posixify) : []) // TODO remove this if we use Vite publicDir option
]);
const seen = new Set();
const written = new Set();
Expand Down

0 comments on commit 3063d4e

Please sign in to comment.