There was an error while loading. Please reload this page.
1 parent 728004d commit bfd1416Copy full SHA for bfd1416
1 file changed
packages/datadog-esbuild/index.js
@@ -270,11 +270,21 @@ ${build.initialOptions.banner.js}`
270
isESM
271
}
272
273
- } catch {
+ } catch (e) {
274
// Skip vendored dependencies which never have a `package.json`. This
275
// will use the default resolve logic of ESBuild which is what we want
276
// since those files should be treated as regular files and not modules
277
// even though they are in a `node_modules` folder.
278
+ if (e.code === 'ENOENT') {
279
+ if (DEBUG) {
280
+ console.log([
281
+ 'Skipping `package.json` lookup.',
282
+ 'This usually means the package was vendored but could indicate an issue otherwise.'
283
+ ].join(' '))
284
+ }
285
+ } else {
286
+ throw e
287
288
289
290
})
0 commit comments