@esbuild-plugins/node-resolve
Advanced tools
Comparing version 0.1.0 to 0.1.1
# @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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57907
1004