scttcper / tinycolor

🎨 Color manipulation and conversion
https://tinycolor.vercel.app
MIT License
544 stars 36 forks source link

Compatible with IE11 ? #79

Closed PooLP closed 6 years ago

PooLP commented 6 years ago

Hi, I have tested your lib on SPFx component (Microsoft Framework for Sharepoint : https://docs.microsoft.com/en-us/sharepoint/dev/spfx/sharepoint-framework-overview)

Your lib work perfectly in all modern browser, but i have error with IE11 : (Characters expected on Transform method apparently)

Your lib is compatible with IE11 ?

Thanks

scttcper commented 6 years ago

How are you using the library? or how is it being imported

PooLP commented 6 years ago

Hi, I'm use this lib in a component for Sharepoint Solution (SPFx). this Is a React + Typescirpt context and i can't not modify Webpack config. (React 15, Webpack 2, TS 2.4.2) and the imposed tsconfig is :

{
  "compilerOptions": {
    "target": "es5",
    "forceConsistentCasingInFileNames": true,
    "module": "esnext",
    "moduleResolution": "node",
    "jsx": "react",
    "declaration": true,
    "sourceMap": true,
    "experimentalDecorators": true,
    "skipLibCheck": true,
    "typeRoots": [
      "./node_modules/@types",
      "./node_modules/@microsoft"
    ],
    "types": [
      "es6-promise",
      "webpack-env"
    ],
    "lib": [
      "es5",
      "dom",
      "es2015.collection"
    ]
  }
}

the import is normal import (i thinks ^^) import { TinyColor } from '@ctrl/tinycolor';

I a reverted on old lib TinyColor2 and it's work correctly on IE11 (but, it's IE :shit:).

That's why I ask the question, Is your lib compatible with IE11?

Thanks

apptaro commented 6 years ago

@PooLP For me, with version 2.0.1, IE raised the error: SCRIPT1003: Expected ':' but, verion 2.1.0 seems to work :)

scttcper commented 6 years ago

Okay great. I made some changes to how it’s built for 2.1.0. I don’t have an IE virtualbox setup at the moment to try it

PooLP commented 6 years ago

It's ok for me, it work perfectly !!!

Another question, are you going to distribute this lib on cdn? (on cdnjs.com it's old version)

Thanks

scttcper commented 6 years ago

right now the plan is to get this merged back into the official tinycolor2 https://github.com/bgrins/TinyColor and then maybe. still working with bgrins on that.

unpkg has it though

https://unpkg.com/@ctrl/tinycolor@2.1.0/bundles/tinycolor.umd.min.js

jeandat commented 4 years ago

Exact same issue with 3.1.1. Does IE11 support has been dropped with the 3.x branch?