sentry-capacitor
sentry-capacitor copied to clipboard
Remove CommonJS or AMD dependencies
Environment
How do you use Sentry?
- Sentry SaaS
Which SDK and version?
- @sentry/capacitor 0.4.0
- @sentry/angular 6.11.0
Steps to Reproduce
- generate a new ionic angular project
- npm install @sentry/capacitor, @sentry/angular
- include Sentry as per documentation
- build capacitor project, e.g. with
ionic cap sync ios
Expected Result
Project builds clean and without warnings
Actual Result
The warning CommonJS or AMD dependencies can cause optimization bailouts is raised:
Warning: ./Development/ionicapp/src/app/app.module.ts depends on '@sentry/capacitor'.
CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
@squio is this something you could contribute with a PR? We're happy to review and merge this
Hi,
@squio is this something you could contribute with a PR? We're happy to review and merge this
I had a quick look at the release built files (in my node_modules) and it looks like the CommonJS require and related statements are somehow generated by the build system. Regrettably that is something I'm not familiar with but changing some settings there might fix this maybe?
Also I compared the initial bundle size with and without @sentry/capacitor which didn't make a huge difference, just over 20 kB for ES 2015 and double that for ES 5.
So overall maybe not a high priority...
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀