opentelemetry-js
opentelemetry-js copied to clipboard
fix: Hide `require.resolve` from bundlers
trafficstars
Which problem is this PR solving?
Bundlers pick up and attempt to parse require.resolve and give warnings or errors because the module name is dynamic.
See https://github.com/open-telemetry/opentelemetry-js/issues/4173#issuecomment-2075469800
Fixes #4173
Short description of the changes
I proposed this fix here https://github.com/open-telemetry/opentelemetry-js/issues/4173#issuecomment-2075816362
Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update