Jump to content


How to use PixiPlugin with webpack?

Recommended Posts

I'm trying to bring in the PixiPlugin with webpack (create-react-app setup). 

import { TweenMax, PixiPlugin } from "gsap";
console.log(PixiPlugin); // undefined


Tried just using it anyway: 


TweenMax.to(this.ship, 1, {
pixi: { scaleX: 2, scaleY: 1.5, skewX: 30, rotation: 60 }


but it doesn't do anything. The old way does work however:

TweenMax.to(this.ship, 1, { rotation: 60 * Math.PI / 180 });


How do you use PixiPlugin with webpack? It appears to be in the npm package...

Link to comment
Share on other sites

Hey @geddski


You can load all the plugins/utils like this.

import { TweenMax } from "gsap";
import PixiPlugin from "gsap/PixiPlugin";


Unless you're using TypeScript, in which case it will be like this until GSAP switches over to ES6 modules.

import { TweenMax } from "gsap";
import * as PixiPlugin from "gsap/PixiPlugin";


  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.