EasyQRCodeJS icon indicating copy to clipboard operation
EasyQRCodeJS copied to clipboard

Proper ESM Import

Open Gabilabrebi opened this issue 4 months ago • 0 comments

It would be great to have a proper ESM export for this package. Currently, for modern project using ESM, the exported way force to :

  • Add in typescript
"allowSyntheticDefaultImports": true
  • Do some weird stuff JS side like
let QRCode // top module variable

// When importing
const easyqrcodejs = await import('easyqrcodejs');
QRCode = easyqrcodejs.default;
  • optimizeDeps in vite for the package to actually works.

Gabilabrebi avatar Aug 14 '25 17:08 Gabilabrebi