feat(bundler): experimental webpack bundling support#7647
Conversation
Overall package sizeSelf size: 5.05 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.0 | 81.15 kB | 815.98 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #7647 +/- ##
==========================================
- Coverage 80.46% 74.61% -5.85%
==========================================
Files 749 768 +19
Lines 32487 35661 +3174
==========================================
+ Hits 26140 26610 +470
- Misses 6347 9051 +2704
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
8f948e7 to
fec13fb
Compare
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 41905e7 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
0715b50 to
33857e5
Compare
5333d4d to
a76a9a2
Compare
a63830e to
58cbf51
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 58cbf51855
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
58cbf51 to
8bf9e1a
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8bf9e1ab24
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
8bf9e1a to
8c38ab5
Compare
| "test:esbuild": "mocha packages/datadog-esbuild/test/**/*.spec.js", | ||
| "test:esbuild:ci": "nyc -- npm run test:esbuild", | ||
| "test:webpack": "mocha packages/datadog-webpack/test/**/*.spec.js", | ||
| "test:webpack:ci": "nyc -- npm run test:webpack", |
There was a problem hiding this comment.
Is it possible to have one script for all bundlers?
There was a problem hiding this comment.
I tried that approach but it was pretty messy. There's a tool called unplugin we can use but I wasn't able to get the code any cleaner.
8c38ab5 to
db23a6f
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: db23a6fc1f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| throw e | ||
| } | ||
|
|
||
| if (isESMFile(normalizedResource, pkgJson, packageJson)) { |
There was a problem hiding this comment.
Preserve native separators for ESM detection
normalizedResource (forward-slash path) is passed into isESMFile, but that helper splits on path.sep. On Windows this means the path never splits as intended, so ESM detection falls back to unrelated package.json lookups (often the app root) and can misclassify ESM files as CJS. In webpack bundles on Windows, this can cause the loader to be injected into ESM modules and break instrumentation/runtime behavior. Use the original platform path for isESMFile (or normalize inside that helper consistently).
Useful? React with 👍 / 👎.
|
@CarlesDD IIRC we had an issue with IAST and esbuild that was fixed by Ugaitz, could you please check if IAST will continue to work with webpack plugin please |
|
I'm fine with sussing out if the IAST issue still exists after this gets merged. It's marked as experimental after all. |
db23a6f to
c80d589
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
c80d589 to
41905e7
Compare
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Example Usage: