This PR fixes build failure caused by Awesome-qr.is:
The latest version of Awesome-qr.is 1.2.0. From this version, it introduces node-canvas as its dependency for Node.js environment usage and the main entry for NPM package has been changed to awesome-qr-node.js which only supports Node.js APIs. When working with webpack, This breaking change causes webpack trying to load the native modules for node-canvas. However, this will never work because we are in browser environment. So we should keep using Awesome-qr.is lower than v1.2.0 until there is a browser entry in its package.json.
Why not Awesome-qr.is 1.1.0?
Awesome-qr.is 1.1.0 introduces a new option named gifBackground and 3 more js files to support GIF background image. Since vue-qr hasn't support GIF background image yet, I figured not using Awesome-qr.is 1.1.0 is the best choice here as it will keep the output js files as minimal as possible for production build.
BTW, there is a typo in my commit message. user should be use😅
This PR fixes build failure caused by
Awesome-qr.is
:awesome-qr-node.js
which only supports Node.js APIs. When working with webpack, This breaking change causes webpack trying to load the native modules fornode-canvas
. However, this will never work because we are in browser environment. So we should keep using Awesome-qr.is lower than v1.2.0 until there is a browser entry in itspackage.json
.gifBackground
and 3 more js files to support GIF background image. Since vue-qr hasn't support GIF background image yet, I figured not using Awesome-qr.is 1.1.0 is the best choice here as it will keep the output js files as minimal as possible for production build. BTW, there is a typo in my commit message.user
should beuse
😅