Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transformer and pixi7 doesn't work if bundled with webpack #85

Closed
rougsig opened this issue May 29, 2023 · 2 comments
Closed

Transformer and pixi7 doesn't work if bundled with webpack #85

rougsig opened this issue May 29, 2023 · 2 comments

Comments

@rougsig
Copy link
Contributor

rougsig commented May 29, 2023

Transformer imports @pixi/interaction, but it was deprecated (as i understand) for pixi 7. At least i cant find version for pixi 7. That line broke all mouse behaviour. Looks like interactive = false, but it's not true.

I did monkey-patch for 3.0.1, just remove require('@pixi/interaction') from assembled js file. And all will works fine.

codepen works well on 3.0.1 and 7.2.4 pixi, because that code (header from transformer.js) in reality doesn't do require('@pixi/interaction') in browser.

(function (global, factory) {
    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@pixi/interaction'), require('@pixi/display'), require('@pixi/math'), require('@pixi-essentials/bounds'), require('@pixi-essentials/object-pool'), require('@pixi/graphics')) :
      typeof define === 'function' && define.amd ? define(['exports', '@pixi/interaction', '@pixi/display', '@pixi/math', '@pixi-essentials/bounds', '@pixi-essentials/object-pool', '@pixi/graphics'], factory) :
        (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global._pixi_essentials_transformer = {}, null, global.PIXI, global.PIXI, global.PIXI, global.PIXI, global.PIXI));
  }(this, (function (exports, interaction, display, math, bounds, objectPool, graphics) { 'use strict'; })));

As fix:
Is it okay to just drop @pixi/interaction import?

cc
#84

@rougsig
Copy link
Contributor Author

rougsig commented May 29, 2023

cc
#86

@ShukantPal
Copy link
Owner

This should be fixed in @pixi-essentials/[email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants