Hi All
I have been wracking my brain with a bit of an issue I am having at the moment trying to get javascript to work correctly on IE11
I have this bit of code for a direction reveal which works in all other major browsers.
const directionRevealSwing = DirectionReveal({
selector: '.direction-reveal', // Container element selector.
itemSelector: '.direction-reveal__card', // Item element selector.
animationName: 'swing', // Animation CSS class.
enableTouch: true, // Adds touch event to show content on first click then follow link on the second click.
touchThreshold: 250, // Touch length must be less than this to trigger reveal which prevents the event triggering if user is scrolling.
});
When I run yarn build:production
and it compiles I get an error in IE11 Expected identifier main_xxx.js
The code turns into something like this
e.a=function({selector:t=".direction-reveal",itemSelector:e=".direction-reveal__card",animationName:n="swing",enableTouch:o=!0,touchThreshold:r=250}={})
This is happening in multiple areas not just the direction reveal and I am not understanding why it has compiled to selector:t=
any further information why this may be happening and if I can change this simply would be well appreciated.