bgrins / TinyColor

Fast, small color manipulation and conversion for JavaScript
https://bgrins.github.io/TinyColor/
MIT License
5.05k stars 439 forks source link

asset files includes ES6 syntax #265

Closed liangzhuang327 closed 1 year ago

liangzhuang327 commented 1 year ago

errorInfo: Uncaught SyntaxError: Use of const in strict mode. tinyColor2 code: const trimLeft = /^\s+/; const trimRight = /\s+$/;

react-color dependences inludes TinyColor2 ; version: TinyClolor2——@1.5.2 ; react-color——@2.18.0 device: android version is 5.0 and chrome version is 39 suggestion: output the bundle should translate ES6 to ES5

bgrins commented 1 year ago

I have a work in progress for this in https://github.com/bgrins/TinyColor/tree/build-babel

bgrins commented 1 year ago

Hi @liangzhuang327 this fix should be published on npm. Let me know if you have any more issues with it.