greensock / GSAP

GSAP (GreenSock Animation Platform), a JavaScript animation library for the modern web
https://gsap.com
19.85k stars 1.72k forks source link

Expected ':' on IE11 #301

Closed JuanJo4 closed 5 years ago

JuanJo4 commented 5 years ago

I'm having this issue on IE11 Expected ':' on IE11, debugging it found the message came from TweenLite.js

image 2019-02-19 at 6 53 47 pm

Just importing the library breaks on IE 11

import {TweenMax, Linear} from 'gsap/TweenMax'

using version "gsap": "^2.0.2",

jackdoyle commented 5 years ago

Hm, we'd need a little more context here. Can you provide a reduced test case? Thousands of people have used GSAP 2.0.2 in IE11 and it works great, so I suspect this has something to do with your setup or other code but it's tough to troubleshoot blind. We'd be happy to take a look at a reduced test case.

You're not trying to do an ES6 import directly in IE 11, are you? That browser doesn't support ES6 modules. I assume you've got a bundler that's transpiling to ES5, right?

JuanJo4 commented 5 years ago

Yes, we are using it in a Gatsby solution "gatsby": "^2.0.19" I guess is transpiling to ES5 behind the scenes but really don't know al the details. Maybe is a polyfill missing in gatsby configuration but don't have a clue on which could it be 🤔

jackdoyle commented 5 years ago

I wish I could help more, but without a reduced test case or something to look at, I'm at a loss. I'm pretty confident it's not a GSAP issue, but please let me know if you see any evidence to the contrary. And if you still need some help, shoot us a reduced test case and we'd be glad to take a peek.