Retain comment

This commit is contained in:
Nathan Whitaker 2024-10-15 17:41:26 -07:00
parent 26c13a28bf
commit 49d941c00e
No known key found for this signature in database

View file

@ -293,6 +293,7 @@ function folderIsModule(folder: string): boolean {
const isDeno = typeof process.versions.deno === 'string';
if (!packageJsonPath)
return isDeno;
// Rely on `require` internal caching logic.
const type = require(packageJsonPath).type;
if (type === 'module')
return true;