pixi-viewport icon indicating copy to clipboard operation
pixi-viewport copied to clipboard

ES6 `class` and `extends` in dist/viewport.js

Open Garoth opened this issue 4 years ago • 3 comments

After many hours spent pulling hair out and checking kubernetes configurations, I realized that there's very strange stuff going on with the latest viewport (4.18.1) and pixi 4.x

  • the non-es5 dist target still contains the class keyword, and is thus "es6" (or es2015)
  • when running in non-compiled es6 mode, the browser loved it
  • as soon as I ran in production / compiled mode, viewport would silently break and simply not render anything. It behaves as if ticker had stopped, though it hadn't

Granted, my webpack/babel setup is old and wack, but, yeah, generally this whole thing was only resolved by me switching back to viewport v3.4.1. Honestly, I'm not sure what breaks it in webpack -p mode, but I'm willing to believe that part was caused by my legacy setup. Still, perhaps if the ES5 target was valid and I didn't have to transpile it, I may be able to use the latest version

Thanks for the awesome software, and I'm enjoying using it quite a lot for https://flowerpatch.app/game

Garoth avatar Feb 18 '21 11:02 Garoth

Thanks for the bug report. I added babel to the dist/viewport.js, published as 4.19.1. There should be no more es6 code in that bundle. Let me know if you have any other issues.

Your game looks really cool!

davidfig avatar Feb 19 '21 00:02 davidfig

Wow, incredible turnaround! Thank you so much, I'll give it a try. And thanks again for your awesome projects

On Thu, Feb 18, 2021, 4:13 PM David Figatner [email protected] wrote:

Thanks for the bug report. I added babel to the dist/viewport.js, published as 4.19.1. There should be no more es6 code in that bundle. Let me know if you have any other issues.

Your game looks really cool!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/davidfig/pixi-viewport/issues/282#issuecomment-781720408, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABSK2EPXYM6YLWV27S7PMLS7WUL3ANCNFSM4X2E44JQ .

Garoth avatar Feb 19 '21 07:02 Garoth

@davidfig The class and extends keyword still exist in the viewport.js file in dist. I don't know if it was resolved and then added again, but anyway, the same issue exists in the last release, version 4.34.4.

HealGaren avatar Aug 11 '22 03:08 HealGaren