diff --git a/packages/kit/src/exports/vite/preview/index.js b/packages/kit/src/exports/vite/preview/index.js index 3573369d3912..1e5045dd3bda 100644 --- a/packages/kit/src/exports/vite/preview/index.js +++ b/packages/kit/src/exports/vite/preview/index.js @@ -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'; @@ -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?`); }