scholtz / qrcode-vue3

MIT License
87 stars 33 forks source link

Update Importing Modules #50

Closed judithweng closed 2 months ago

judithweng commented 4 months ago

When the code runs in Nuxt3 production mode, the following error comes up: "The requested module 'qrcode-vue3' does not provide an export named 'default'." This issue is mentioned in #36. Another user in the thread proposed a solution using import QRCodeVue3 from "qrcode-vue3/src/QRCodeVue3.vue";

However, this issue works in production mode but fails in development mode. The error is the same ("The requested module 'qrcode-vue3' does not provide an export named 'default') and comes from the 'QRCodeStyling.ts' file. I changed the way the qrcode-generator module is imported. This seems to fix the issue for my project and works on both dev and production mode.