Describe the bug
I am receiving the following warning while compiling an angular 10 application:
Warning: Entry point 'simplebar-angular' contains deep imports into 'C:/Users/.../node_modules/simplebar/dist/simplebar-core.esm'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
followed by this warning (probably related to the original one):
WARNING in C:\Users\...\node_modules\simplebar\dist\simplebar-core.esm.js depends on 'core-js/modules/es.array.filter'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
WARNING in C:\Users\...\node_modules\simplebar\dist\simplebar-core.esm.js depends on 'core-js/modules/es.string.replace'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
WARNING in C:\Users\...\node_modules\simplebar\dist\simplebar-core.esm.js depends on 'core-js/modules/es.regexp.exec'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
WARNING in C:\Users\...\node_modules\simplebar\dist\simplebar-core.esm.js depends on 'core-js/modules/es.string.match'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
WARNING in C:\Users\...\node_modules\simplebar\dist\simplebar-core.esm.js depends on 'core-js/modules/es.function.name'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
WARNING in C:\Users\...\node_modules\simplebar\dist\simplebar-core.esm.js depends on 'core-js/modules/es.array.reduce'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
WARNING in C:\Users\...\node_modules\simplebar\dist\simplebar-core.esm.js depends on 'core-js/modules/es.weak-map'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
WARNING in C:\Users\...\node_modules\simplebar\dist\simplebar-core.esm.js depends on 'core-js/modules/web.dom-collections.iterator'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
WARNING in C:\Users\...\node_modules\simplebar\dist\simplebar-core.esm.js depends on 'core-js/modules/es.string.iterator'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
WARNING in C:\Users\...\node_modules\simplebar\dist\simplebar-core.esm.js depends on 'core-js/modules/es.parse-int'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
WARNING in C:\Users\...\node_modules\simplebar\dist\simplebar-core.esm.js depends on 'core-js/modules/es.object.to-string'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
WARNING in C:\Users\...\node_modules\simplebar\dist\simplebar-core.esm.js depends on 'core-js/modules/es.object.assign'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
WARNING in C:\Users\...\node_modules\simplebar\dist\simplebar-core.esm.js depends on 'core-js/modules/es.array.iterator'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
WARNING in C:\Users\...\node_modules\simplebar\dist\simplebar-core.esm.js depends on 'core-js/modules/es.array.for-each'. CommonJS or AMD dependencies can cause optimization bailouts.
s.array.for-each'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No warnings.
Your environment
| Software | Version(s) |
| ---------------- | ---------- |
| SimpleBar | 2.3.0
| Angular | 10.2.3
| Browser | edge / chrome (latest)
| Operating System | windows 10
here is a post talking about this Warning: Entry point simplebar-angular contains deep imports
try adding in the angular.json in the "build"=> "options":
"allowedCommonJsDependencies": ["core-js"]
Yes, that's what I did, thanks.
This will ignore all the core-js warning's about the CommonJS , but the deep import issue still remains.
@axmad22 that's works for me, thanks.
Most helpful comment
here is a post talking about this Warning: Entry point simplebar-angular contains deep imports
try adding in the angular.json in the "build"=> "options":
"allowedCommonJsDependencies": ["core-js"]