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

A bug by using ismobilejs because of the wrong api uesed #6511

Closed
HypnosNova opened this issue Apr 1, 2020 · 4 comments
Closed

A bug by using ismobilejs because of the wrong api uesed #6511

HypnosNova opened this issue Apr 1, 2020 · 4 comments
Labels
👯‍♀️ Needs Reproduction Very common: basically need an example that reproduces the issue so that it's easier to identify.

Comments

@HypnosNova
Copy link

Expected Behavior

no mistakes when compiling

Current Behavior

image

Possible Solution

image

Steps to Reproduce

STEP 1: npm i pixi.js and then using
import * as PIXI from './pixi.js';
And just write a hello world demo.
STEP 2: compiler the project and failed

Environment

  • pixi.js version: _e.g. newest
  • Browser & Version: _e.g. any bloswers
  • OS & Version: _e.g. any os
  • Running Example:
@bigtimebuddy
Copy link
Member

Please provide a repo the reproduces the issue. Your step are insufficient and the tools you’re using to compile probably matter.

@bigtimebuddy bigtimebuddy added the 👯‍♀️ Needs Reproduction Very common: basically need an example that reproduces the issue so that it's easier to identify. label Apr 1, 2020
@HypnosNova
Copy link
Author

Using PIXI with react.
When compiling the whole project and run it on browser, we could see following error:
image
I add a console to see what ismobilecall is.
And in browser console, we could see ismobilecall is an object that contains several APIs,
image
That means after the project compiled, ismobilejs export default an Object instead of a function.

But strangely, I create a new project and use rollup to compile, nothing went wrong, only in react project it went wrong.
So is it a bug in react tools? Or do you know any solutions to solve it

@notorigine
Copy link

I believe it is an issue with v1 of ismobilejs - see issue #115.

Using a complete different stack than React (Gulp, ES6), it is also causing an error when running my build process, because ismobilejs isn't transpiled when imported as a dependancy by @pixi/settings (see screenshots).

Capture d’écran 2020-04-09 à 00 59 45
Capture d’écran 2020-04-09 à 00 59 23

Any thoughts on how to solve this?

@bigtimebuddy
Copy link
Member

Fixed, will try to get out a release ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👯‍♀️ Needs Reproduction Very common: basically need an example that reproduces the issue so that it's easier to identify.
Projects
None yet
Development

No branches or pull requests

3 participants