5
votes

I've updated from angular 7.1.4 to 10. Now i receive strange warnings like this one:

WARNING in C:\Sviluppo\Welcome\welcome-cloud-app\src\app\calendario-fasce\mese\mese.component.ts depends on src/app/interfaces/calendar/calendar.component. CommonJS or AMD dependencies can cause optimization bailouts. For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

For other warnings like this, i've added in angular.json the relative line, for example:

"allowedCommonJsDependencies": [
    "moment",
    ....
]"

How can i resolve this warning relative to my components?

1
can you share the import code of the calendar.component in mese.component.ts? - Arun Kumar

1 Answers

6
votes

Removing TS alias might work.

import { x } from '@auth/auth....'           // Warning
...to...
import { x } from '../auth/...'              // Warning goes away

Refer this link for more