Skip to content

Proper ESM Import #94

Description

@Gabilabrebi

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions