cozmo / jsQR

A pure javascript QR code reading library. This library takes in raw images and will locate, extract and parse any QR code found within.
https://cozmo.github.io/jsQR/
Apache License 2.0
3.67k stars 606 forks source link

Consider adding support for importing using ESM #107

Open TomasHubelbauer opened 5 years ago

TomasHubelbauer commented 5 years ago

Hello, I am not entirely sure this is possible, but reading through this article it seems like it should be possible to import CJS modules from ESM.

I'd like to request that, if possible, support be added for jsQR to be import-able in ESM:

import jsQR from 'https://unpkg.com/jsqr/dist/jsQR.js';

I would have contributed a PR, but I have no idea how to achieve this. I am interested in your thoughts on the topic and whether you think this is achieveable.