Cordobo / angularx-qrcode

A fast and easy-to-use Angular QR Code Generator library with Ivy support
https://cordobo.github.io/angularx-qrcode/
MIT License
459 stars 127 forks source link

Replace qrcode library to fix commonjs warning #202

Closed iCodr8 closed 1 year ago

iCodr8 commented 1 year ago

[webpack-dev-server] WARNING .../node_modules/angularx-qrcode/fesm2020/angularx-qrcode.mjs depends on 'qrcode'. CommonJS or AMD dependencies can cause optimization bailouts. For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies logger @ index.js:556 (anonymous) @ index.js:730 warn @ index.js:189 warnings @ index.js:247 (anonymous) @ socket.js:60 client.onmessage @ WebSocketClient.js:50 Show 6 more frames

eXpertise7 commented 1 year ago

Here's a temporarily solution: for now add to angular.json file to:

architect: { build: { allowedCommonJsDependencies": [ 'qrcode' ..

image

Cordobo commented 1 year ago

@iCodr8

I hope the workaround provided by @eXpertise7 helped you.

I'm closing this for now, please re-open if this is still an issue.

de-don commented 4 months ago

This is not fixing the issue, this is just disables it. I think it's better to try to remove qrcode library from deps to remove this warning and provide better optimization.