neocotic / qrious

Pure JavaScript library for QR code generation using canvas
https://neocotic.com/qrious
Other
1.55k stars 215 forks source link

Object doesn't support property or method 'assign' #55

Closed zucker-rdrg closed 8 years ago

zucker-rdrg commented 8 years ago

Cannot use qrious in IE or Safari <= 8 https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Browser_compatibility

neocotic commented 8 years ago

Good spot! I was under the impression that Babel replaced such code. I'll take a look at this.

neocotic commented 8 years ago

I just wanted to provide an update on this as I've not done so for a while.

It would seem that, in order to get this working with the current system, I'll have to include the babel-runtime transformers inside of QRious. This isn't too tricky to do, however, it comes at a cost. Doing so will no doubt add a big bloat (~20KB) to the minified code base. I'm going to look into ways of minimizing this and possible alternatives such as not using ES6+Babel (another rewrite :cry:).

I'm tempted to take a staged approach to this:

  1. Fix bug by including babel-runtime transformers
  2. Try to minimize bloat using whatever means possible
neocotic commented 8 years ago

This issue should be fixed in the just-released version 2.1.0 of QRious.

Please try upgrading and let me know how you get on.

As a result of the fix, babel-runtime has been bundled in our distribution files. Unfortunately, this has added some bloat to the size of our files so I've raised #59 which will attempt to investigate and address this.

zucker-rdrg commented 8 years ago

Hi, I've checked this on IE 10 and it works :)

Thank you