question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CommonJS or AMD dependencies can cause optimization bailouts

See original GitHub issue

Steps to reproduce

When doing a --prod build the following warning is presented: .

WARNING in C:\Projects\Kasi\WebsiteProjects\Website.Portal\kasi-portal\node_modules\@ant-design\icons-angular\__ivy_ngcc__\fesm2015\ant-design-icons-angular.js depends on '@ant-design/colors'. CommonJS or AMD dependencies can cause optimization bailouts.

What is actually happening?

Shows a warning when it doesn’t need to.

Environment Info
ng-zorro-antd 10.1.2
Browser Chrome
Angular 10.1.4

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
C3maLicommented, Nov 24, 2020

I produced a solution like this. Try it if you wish.

angular.json "architect": { "build": { "options": { "allowedCommonJsDependencies": [ "@ant-design/colors" ] }, } }

0reactions
hulliscommented, Nov 24, 2020

I am closing this issue since this could be fixed by reinstalling. 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix CommonJS or AMD dependencies can cause optimization ...
js depends on rxjs-compat/operators/map. CommonJS or AMD dependencies can cause optimization bailouts. – Ora. Jun 26, 2020 at 11:23.
Read more >
Angular warning: CommonJS or AMD dependencies ... - GitHub
js depends on '@babel/runtime-corejs3/core-js-stable/reflect/get-prototype-of'. CommonJS or AMD dependencies can cause optimization bailouts.
Read more >
CommonJS or AMD dependencies can cause ... - Highcharts
CommonJS or AMD dependencies can cause optimization bailouts. depends on 'highcharts/modules/gantt'. CommonJS or AMD dependencies can cause ...
Read more >
Angular 10 Upgrade - Fix CommonJS or AMD dependencies ...
JavaScript : Angular 10 Upgrade - Fix CommonJS or AMD dependencies can cause optimization bailouts [ Gift : Animated Search Engine ...
Read more >
Optimization Bailout Warnings - DevExpress Support
CommonJS or AMD dependencies can cause optimization bailouts. For more info see: https://angular.io/guide/build#configuring-commonjs- ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found