Skip to content

Commit b5908a2

Browse files
fix: treat config file as ESM in Deno (#18158)
1 parent f969176 commit b5908a2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/vite/src/node/config.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,8 @@ export async function loadConfigFromFile(
10351035
return null
10361036
}
10371037

1038-
const isESM = isFilePathESM(resolvedPath)
1038+
const isESM =
1039+
typeof process.versions.deno === 'string' || isFilePathESM(resolvedPath)
10391040

10401041
try {
10411042
const bundled = await bundleConfigFile(resolvedPath, isESM)

0 commit comments

Comments
 (0)