-
Notifications
You must be signed in to change notification settings - Fork 65
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
Trouble with webpack build #34
Comments
works for me on https://phaser.io/examples/v2/animation/animation-events |
Yeah sure that works fine, but, I mean if Pixi(or Phaser) library bundled by webpack, debugger can't detect it. |
Here's my webpack config file. const path = require('path');
module.exports = {
context: path.resolve(__dirname, 'wwwroot', 'Core'),
entry: path.join(__dirname, 'wwwroot', 'Core', '/Main.ts'),
output: {
filename: 'game-core.js',
path: path.join(__dirname, 'wwwroot', 'js')
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'ts-loader',
exclude: /node_modules/,
},
{ test: /\.js$/, loader: 'source-map-loader', enforce: 'pre' }
]
},
resolve: {
extensions: [".tsx", ".ts", ".js"]
},
devtool: 'eval-source-map'
}; And this is entry point (Called from Main.ts) import * as Phaser from 'phaser';
export class GameManager
{
/** RootUrl for resources of game. */
private static RootUrl: string;
/** Current Phaser program. */
private static Application: Phaser.Game;
public static Init(url :string) :void
{
this.SetupUrl(url);
if (this.Application != null) {
this.Application.destroy(true);
this.Application = null;
}
this.Application = new Phaser.Game({
type: Phaser.AUTO,
width: 800,
height: 600,
physics: {
default: 'arcade'
},
scene: {
preload: this.OnPreload,
create: this.OnApplicationReady
}
});
}
... |
if you can share a sample minimal project with your webpack setup, etc, on the weekend i might have a few mins to look into it. My guess that the detection runs only once there.. |
Also having this exact issue |
You'll need to manually register the PIXI variable to the pixi inspector. window.__PIXI_INSPECTOR_GLOBAL_HOOK__ && window.__PIXI_INSPECTOR_GLOBAL_HOOK__.register({ PIXI: window.PIXI }); https://github.com/bfanger/pixi-inspector/blob/master/tests/example.js#L7-L8 |
You're passing Phaser, not PIXI. Phaser used to have Phaser.PIXI. if you also pass Phaser to the register method it'll show the phaser icon and version |
Phaser 3 no longer uses PixiJS as its renderer |
http://www.html5gamedevs.com/topic/34261-does-phaser-3-use-pixijs/ I just found this thread... okay so close this issue. |
Plugin can't detect Phaser (based on Pixijs) bundled from webpack.
how can I inspect with this?
The text was updated successfully, but these errors were encountered: