Skip to content

Commit

Permalink
replace existsSync with fs.existsSync
Browse files Browse the repository at this point in the history
Co-authored-by: Conduitry <git@chor.date>
  • Loading branch information
gtm-nayan and Conduitry authored Jul 7, 2023
1 parent f33e4e6 commit e19ceb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/kit/src/exports/vite/preview/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import fs, { existsSync } from 'node:fs';
import fs from 'node:fs';
import { join } from 'node:path';
import { pathToFileURL } from 'node:url';
import sirv from 'sirv';
Expand Down Expand Up @@ -36,7 +36,7 @@ export async function preview(vite, vite_config, svelte_config) {

const dir = join(svelte_config.kit.outDir, 'output/server');

if (!existsSync(dir)) {
if (!fs.existsSync(dir)) {
throw new Error(`Server files not found at ${dir}, did you run \`build\` first?`);
}

Expand Down

0 comments on commit e19ceb8

Please sign in to comment.