sentry-javascript-bundler-plugins icon indicating copy to clipboard operation
sentry-javascript-bundler-plugins copied to clipboard

thirdPartyErrorFilterIntegration on Angular with esbuild not working

Open guillaume-moreau opened this issue 1 year ago • 6 comments

Environment

Angular 17 app built with esbuild.

Steps to Reproduce

  • Init a new Angular project:
  • Add sentry/esbuild-plugin
  • Integrate the plugin in the Angular builder

Expected Result

I would expect my applicationKey to appear in the build source.

Actual Result

It doesn't appear. (it does when switching to webpack)

Made a reproduction repository here: https://github.com/guillaume-moreau/sentry-esbuild-plugin-bug

guillaume-moreau avatar Oct 28 '24 16:10 guillaume-moreau

Hey @guillaume-moreau thanks for providing the reproduction!

I just had a look and there seems to be an issue somewhere along our esbuildModuleMetadataInjectionPlugin, but I couldn't pin that down yet.

chargome avatar Oct 29 '24 14:10 chargome

Hello !

Any news about this issue ? :)

guillaume-moreau avatar Feb 10 '25 09:02 guillaume-moreau

Hey @guillaume-moreau, sorry this fell off our plate. We'll have another look at it.

andreiborza avatar Feb 10 '25 09:02 andreiborza

I've been looking at this an can confirm it is an issue, but I have no idea what is breaking. We have integration tests which show this feature working with the esbuild plugin. Since this is not a regular esbuild setup, I need to dig into what (if anything) Angular adds to the config and/or plugins and see if they're causing the issue.

timfish avatar Feb 10 '25 10:02 timfish

Hey !

I was looking at some esbuild plugin stuff and came across this issue on angular-cli : https://github.com/angular/angular-cli/issues/26326

Do you think it may be the cause of our issue ?

guillaume-moreau avatar Feb 27 '25 15:02 guillaume-moreau

I could be but I'm not entirely sure and it seems to suggest the issue is not fixable.

timfish avatar Feb 28 '25 09:02 timfish

We are not sure how to fix this and it looks like it's a compatibility issue with angular cli. If the cli behaviour changes in the future we will re-visit this!

timfish avatar Aug 05 '25 11:08 timfish