-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
esbuild bundling support external dependencies #3188
Comments
For the mysql2 problem, I opened a merge request on their repo to allow the resolve to work as expected EDIT : PR has been merged and added to 3.3.3 release |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When bundling code with esbuild and using the dd-trace esbuild plugin, I run into an issue when resolving all dependencies, as some are specified as external for some useless dependencies I'm not using. Yet, dd-trace plugin still tries to resolve them.
Expected behaviour
external packages should not be resolved by the plugin
Actual behaviour
External packages are still resolved, causing issues when they are not added as dependencies
Steps to reproduce
Sample project, with knex for example that has multiple external dependencies not useful, for example mysql if I'm using postgres, etc...
If I still try to add those dependencies, I run into another issue, which is that
mysql2
is declared as instrumented, but the resolve is calling the package.json, which is not included inmysql2
, causing the export to fail similarly. This would indicate that the listdatadog-instrumentations/src/helpers/hooks.js
is not entirely compatible.I think an easy fix would be to either:
instrumented
list provided by datadog.Environment
The text was updated successfully, but these errors were encountered: