You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would benefit from this when experimenting with QR codes locally, without a build process.
I would have created a pull request, but I am not sure how to feature detect and export the library. Theoretically all you need to do is to add export default { ... }, but in browsers where ES native modules are not supported yet, this would have caused an error to be thrown. At the same time, export cannot be stated conditionally, so feature detection for native ES modules and then export doesn't seem to be possible.
I know you are not using a build process, so I am not going to suggest you create two variants, one with ES module support and one without, because this is not a pressing issue at all (can always just use script and find what I need on window.qrcode), but I am interested if you have any thoughts on how this could be achieved without introducing a build process.
The text was updated successfully, but these errors were encountered:
There is a qrcode-generator-es6 package on NPM, but it seems to be a fork, made 3 years ago, on an older version of the library (not even sure it is about this library, actually! but it kept your project blurb, even if it doesn't make sense).
Would you consider to make an ES6 module release, please?
Anyway, many thanks for your great library.
Hello, I'd like to request that you add support for importing this library using native ES modules, like so:
I would benefit from this when experimenting with QR codes locally, without a build process.
I would have created a pull request, but I am not sure how to feature detect and export the library. Theoretically all you need to do is to add
export default { ... }
, but in browsers where ES native modules are not supported yet, this would have caused an error to be thrown. At the same time,export
cannot be stated conditionally, so feature detection for native ES modules and then export doesn't seem to be possible.I know you are not using a build process, so I am not going to suggest you create two variants, one with ES module support and one without, because this is not a pressing issue at all (can always just use
script
and find what I need onwindow.qrcode
), but I am interested if you have any thoughts on how this could be achieved without introducing a build process.The text was updated successfully, but these errors were encountered: