Skip to content
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

warnings in Angular 10 upgrade - CommonJS or AMD dependencies can cause optimization bailouts #97

Open
apranzetti opened this issue Oct 2, 2020 · 2 comments

Comments

@apranzetti
Copy link

Describe the bug
Upgrading to the latest version of angular and using '@markpieszak/ng-application-insights' will cause console warnings

To Reproduce
Steps to reproduce the behavior:

Install version 10 of Angular CLI
Follow instructions from here https://docs.amplify.aws/start/getting-started/installation/q/integration/angular
build the app

Temporarily solution
Add to angular.json : "allowedCommonJsDependencies": [ "@markpieszak/ng-application-insights" ]
to avoid console error.

Expected behavior
NO warnings.

Console snippet

WARNING in *** depends on '@markpieszak/ng-application-insights'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
@MarkPieszak
Copy link
Member

I believe this may be due to the fact that we're using the underlying microsoft/application-insights-js package. I'm looking but I'm not sure if the v2 version even fixes this issue there.

@Astrophizz
Copy link

According to this comment, v2 uses ES6 modules microsoft/ApplicationInsights-JS#301 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants