Convert globbed imports from PIXI to explicit package imports
Currently our code is sprinkled with
import * as PIXI from 'pixi.js';
we should REALLY convert these to explicit imports a la:
import {Container, Rectangle} from 'pixi';
The latter will allow esbuild to tree-shake more effectively and get rid of things we don't use.
Did some work on this today but it seems that we have some snags:
-
Resource loading doesn't work the same way apparently- the Promises being returned by the loader aren't including the 'textures' object which the helpers.js and others rely on.
-
The Pixi debugger chrome extension relies on a full bundle to be defined as PIXI
-
There were no bundle size savings even after doing it.
(stored on my local 'import_rework' branch)