DevExpress / devextreme-angular

Angular UI and data visualization components
https://js.devexpress.com/Demos/
MIT License
563 stars 159 forks source link

Angular 11 'CommonJS or AMD Dependencies' warning on devextreme-angular v20.2.4 #1167

Closed rkspx closed 3 years ago

rkspx commented 3 years ago

Hi, i've upgraded devextreme-angular to version 20.2.4, but still getting CommonJS or AMD dependencies warnings from angular build. I tried to create fresh project using ng new and add devextreme using npx -p devextreme-cli devextreme add devextreme-angular, but still getting same warnings, am I missing something?

Imported Modules DxDataGridModule DxBulletModule DxTemplateModule

Package versions: angular version: ~11.2.12 devexteme version: ^20.2.4 devextreme-angular version: ^20.2.4

Warnings

  Warning: C:\Users\kosir\learnspace\angular\nebular01\src\app\app.service.ts depends on 'devextreme/data/data_source'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\src\app\app.service.ts depends on 'devextreme/data/odata/store'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-button.js depends on 'devextreme/ui/button'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-drawer.js depends on 'devextreme/ui/drawer'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-slide-out-view.js depends on 'devextreme/ui/slide_out_view'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-scroll-view.js depends on 'devextreme/ui/scroll_view'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-speed-dial-action.js depends on 'devextreme/ui/speed_dial_action'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-load-indicator.js depends on 'devextreme/ui/load_indicator'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-resizable.js depends on 'devextreme/ui/resizable'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-validator.js depends on 'devextreme/ui/validator'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-vector-map.js depends on 'devextreme/viz/vector_map'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-validation-summary.js depends on 'devextreme/ui/validation_summary'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-tile-view.js depends on 'devextreme/ui/tile_view'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-text-box.js depends on 'devextreme/ui/text_box'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-tree-list.js depends on 'devextreme/ui/tree_list'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-tabs.js depends on 'devextreme/ui/tabs'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-text-area.js depends on 'devextreme/ui/text_area'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-tree-map.js depends on 'devextreme/viz/tree_map'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-tooltip.js depends on 'devextreme/ui/tooltip'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-toast.js depends on 'devextreme/ui/toast'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-tag-box.js depends on 'devextreme/ui/tag_box'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-switch.js depends on 'devextreme/ui/switch'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-sparkline.js depends on 'devextreme/viz/sparkline'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-responsive-box.js depends on 'devextreme/ui/responsive_box'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-slide-out.js depends on 'devextreme/ui/slide_out'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-slider.js depends on 'devextreme/ui/slider'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-scheduler.js depends on 'devextreme/ui/scheduler'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-sankey.js depends on 'devextreme/viz/sankey'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-recurrence-editor.js depends on 'devextreme/ui/recurrence_editor'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-range-selector.js depends on 'devextreme/viz/range_selector'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-radio-group.js depends on 'devextreme/ui/radio_group'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-range-slider.js depends on 'devextreme/ui/range_slider'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-progress-bar.js depends on 'devextreme/ui/progress_bar'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-pivot-grid-field-chooser.js depends on 'devextreme/ui/pivot_grid_field_chooser'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-polar-chart.js depends on 'devextreme/viz/polar_chart'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-nav-bar.js depends on 'devextreme/ui/nav_bar'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-pivot-grid.js depends on 'devextreme/ui/pivot_grid'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-pie-chart.js depends on 'devextreme/viz/pie_chart'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-map.js depends on 'devextreme/ui/map'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-gantt.js depends on 'devextreme/ui/gantt'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-linear-gauge.js depends on 'devextreme/viz/linear_gauge'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-lookup.js depends on 'devextreme/ui/lookup'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-funnel.js depends on 'devextreme/viz/funnel'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-file-uploader.js depends on 'devextreme/ui/file_uploader'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-gallery.js depends on 'devextreme/ui/gallery'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-file-manager.js depends on 'devextreme/ui/file_manager'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-diagram.js depends on 'devextreme/ui/diagram'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-html-editor.js depends on 'devextreme/ui/html_editor'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-drop-down-button.js depends on 'devextreme/ui/drop_down_button'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-defer-rendering.js depends on 'devextreme/ui/defer_rendering'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-drop-down-box.js depends on 'devextreme/ui/drop_down_box'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-data-grid.js depends on 'devextreme/ui/data_grid'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-circular-gauge.js depends on 'devextreme/viz/circular_gauge'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-color-box.js depends on 'devextreme/ui/color_box'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-chart.js depends on 'devextreme/viz/chart'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-button-group.js depends on 'devextreme/ui/button_group'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-calendar.js depends on 'devextreme/ui/calendar'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-bullet.js depends on 'devextreme/viz/bullet'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-autocomplete.js depends on 'devextreme/ui/autocomplete'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-bar-gauge.js depends on 'devextreme/viz/bar_gauge'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-ui-accordion.js depends on 'devextreme/ui/accordion'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  Warning: C:\Users\kosir\learnspace\angular\nebular01\node_modules\devextreme-angular\__ivy_ngcc__\fesm2015\devextreme-angular-core.js depends on 'devextreme/events'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
hakimio commented 3 years ago

Those warnings are present since Angular v10. https://supportcenter.devexpress.com/ticket/details/t904910 https://supportcenter.devexpress.com/ticket/details/t943295

It should be fixed in DX v21.1. Until then the only workaround is to explicitly allow them in angular.json:

"allowedCommonJsDependencies": ["devextreme"]
rkspx commented 3 years ago

okay, got it