Because react-pixi imports pixi.js directly it's quite hard to configure your project with pixi-legacy. You need to alias pixi.js to pixi.js-legacy in your bundler/babel config. It can be a bit frustrating, especially if you're using a project scaffold tool like CRA and are forced to eject your project because of this.
Related issue: #126
Support fallback to Canvas out of the box
Because react-pixi imports
pixi.js
directly it's quite hard to configure your project withpixi-legacy
. You need to aliaspixi.js
topixi.js-legacy
in your bundler/babel config. It can be a bit frustrating, especially if you're using a project scaffold tool like CRA and are forced to eject your project because of this.Now here's the solution:
Install pixi legacy:
Use the legacy export:
now this works: