@esbuild-plugins/node-resolve
Advanced tools
Comparing version
# @esbuild-plugins/node-resolve | ||
## 0.1.1 | ||
### Patch Changes | ||
- Fix unhandled errors in pnpapi | ||
## 0.1.0 | ||
@@ -4,0 +10,0 @@ |
@@ -64,6 +64,9 @@ "use strict"; | ||
if (res && pnpapi) { | ||
const realPath = pnpapi.resolveVirtual(res); | ||
if (realPath) { | ||
return realPath; | ||
try { | ||
const realPath = pnpapi.resolveVirtual(res); | ||
if (realPath) { | ||
return realPath; | ||
} | ||
} | ||
catch (_c) { } | ||
} | ||
@@ -143,6 +146,9 @@ return res; | ||
if (resolveSynchronously && resolved && pnpapi) { | ||
const realPath = pnpapi.resolveVirtual(resolved); | ||
if (realPath) { | ||
return { path: realPath, namespace }; | ||
try { | ||
const realPath = pnpapi.resolveVirtual(resolved); | ||
if (realPath) { | ||
return { path: realPath, namespace }; | ||
} | ||
} | ||
catch (_a) { } | ||
} | ||
@@ -149,0 +155,0 @@ if (resolved) { |
{ | ||
"name": "@esbuild-plugins/node-resolve", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -50,6 +50,8 @@ import { OnResolveArgs, OnResolveResult, Plugin } from 'esbuild' | ||
if (res && pnpapi) { | ||
const realPath = pnpapi.resolveVirtual(res) | ||
if (realPath) { | ||
return realPath | ||
} | ||
try { | ||
const realPath = pnpapi.resolveVirtual(res) | ||
if (realPath) { | ||
return realPath | ||
} | ||
} catch {} | ||
} | ||
@@ -171,6 +173,8 @@ return res | ||
if (resolveSynchronously && resolved && pnpapi) { | ||
const realPath = pnpapi.resolveVirtual(resolved) | ||
if (realPath) { | ||
return { path: realPath, namespace } | ||
} | ||
try { | ||
const realPath = pnpapi.resolveVirtual(resolved) | ||
if (realPath) { | ||
return { path: realPath, namespace } | ||
} | ||
} catch {} | ||
} | ||
@@ -177,0 +181,0 @@ if (resolved) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
57907
0.75%1004
1.01%