fix: handle process.env being undefined while process is not

closes #3579
pull/3581/head
Divyansh Singh 5 months ago committed by GitHub
parent 20511006db
commit b63e0a0c57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -184,7 +184,7 @@ const KNOWN_EXTENSIONS = new Set()
export function treatAsHtml(filename: string): boolean {
if (KNOWN_EXTENSIONS.size === 0) {
const extraExts =
(typeof process === 'object' && process.env.VITE_EXTRA_EXTENSIONS) ||
(typeof process === 'object' && process.env?.VITE_EXTRA_EXTENSIONS) ||
(import.meta as any).env?.VITE_EXTRA_EXTENSIONS ||
''

Loading…
Cancel
Save