plugins: disable native jiti loading under bun

This commit is contained in:
Jacob Tomlinson
2026-03-27 20:02:59 +00:00
parent 3e4222e9d4
commit cf10183389
2 changed files with 25 additions and 0 deletions

View File

@@ -422,6 +422,10 @@ export function buildPluginLoaderJitiOptions(aliasMap: Record<string, string>) {
}
export function shouldPreferNativeJiti(modulePath: string): boolean {
const versions = process.versions as { bun?: string };
if (typeof versions.bun === "string") {
return false;
}
switch (path.extname(modulePath).toLowerCase()) {
case ".js":
case ".mjs":