Closed greg0r1 closed 6 months ago
Hello @greg0r1
Thank you for contributing to this community by opening an issue.
Unfortunately, I cannot fix (or convert) the underlying lib. You should raise an issue at the node-qrcode github page, so the author knows about the problem your facing.
Thanks again and good luck!
@greg0r1 If you want to get rid of the warning, just add "qrcode" to "allowedCommonJsDependencies" array in your angular.json:
Description
During the development of our Angular project, we've encountered a warning from webpack-dev-server indicating an optimization bailout due to a dependency on the CommonJS module 'qrcode'. This warning suggests potential performance issues.
Warning Message
Here is the warning message received during compilation:
Concern
According to the Angular optimization best practices, reliance on CommonJS modules can significantly affect the build optimization capabilities of Angular applications, potentially resulting in larger bundle sizes and slower application boot times.
Suggested Solutions
Migrate
qrcode
to an ES Module: Is there a possibility to switch to an ES module version ofqrcode
? This could help mitigate the issue and enhance tree-shaking and module optimization capabilities.Documentation Update: If migrating the module isn't immediately feasible, could there be documentation provided on how to handle or silence this warning effectively for users who may face similar issues?
Additional Information
angularx-qrcode
version: 17.0.0Thank you for looking into this issue. We appreciate your efforts in maintaining this library and hope to see a resolution that could help enhance the performance for all Angular developers using
angularx-qrcode
.