Thanks greensock,
I finally got it to work by following your lead. Few things to note though.
For some reason the root property was not valid. I had to delete that line
Secondly, extensions cannot be empty - extensions: ['', '.js']. I set it to extensions: ['.js', '.json']
Finally my webpack config found in @ionic/app-scripts/config/webpack.config.js was as below:
resolve: {
extensions: ['.js', '.json'],
alias: {
"TweenLite": "gsap/src/uncompressed/TweenLite",
"Draggable": "gsap/src/uncompressed/utils/Draggable",
"CSSPlugin": "gsap/src/uncompressed/plugins/CSSPlugin"
}
},
My .ts file is as below
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import jQuery from 'jquery';
import {TweenMax} from 'gsap';
@Component({
selector: 'page-contact',
templateUrl: 'contact.html'
})
export class ContactPage {
constructor(public navCtrl: NavController) {
}
animate(){
var square = jQuery('.square');
TweenMax.to(square, 1, {x: 200, repeat: 10, yoyo: true});
}
}