pixijs / layers

Separate the z-hierarchy of your scene tree from its canonical structure.
https://pixijs.io/layers/docs/
MIT License
220 stars 57 forks source link

After upgrade to v1.0.11, compile to commonjs modules no longer possible in tsConfig #96

Closed danrostron closed 1 year ago

danrostron commented 1 year ago

I recently upgraded from Pixi v5 to v6 and also upgraded to pixi layers to 1.0.11 (compatible with v6). After a long time trying to figure out why I was receiving the ''renderer.incDisplayOrder is not a function" error, I realised that by changing my tsConfig.json module setting from "commonjs" to "ES6" it resolves the issue.

However this same change, now seems to cause a conflict with Robotlegs/Pixi which requires modules format to be common.js.

Why does Pixi layers require this, and is there anyway to resolve it?

ivanpopelyshev commented 1 year ago

Whast robotlegs?

UPD: Oh nice, I'm glad someone implemented it :)

danrostron commented 1 year ago

Yes, we've been using it for many years, but the dependencies are becoming increasingly hard to update to latest versions.

It's based on Inversify JS (which handles dependency injection) and it seems they require 'commonjs' modules - https://github.com/inversify/InversifyJS#-installation

Any ideas how I can get Pixi layers to play nicely with commonjs module format @ivanpopelyshev?

danrostron commented 1 year ago

Managed to instead get Robotlegs working using ES2015 module format instead.