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

When running in development mode the plugin fails to initialise #5

Open
edmundg opened this issue Aug 4, 2024 · 1 comment
Open

Comments

@edmundg
Copy link

edmundg commented Aug 4, 2024

After running npm install then when running npm run dev an error is thrown in TypeScript when registering the debug panel.
This prevents the typescript application from transpiling.

@edmundg
Copy link
Author

edmundg commented Aug 4, 2024

A simple fix for this is adding a new when registering the plugin:

if (process.env.NODE_ENV === 'development') {
    import("@melonjs/debug-plugin").then((debugPlugin) => {
        // automatically register the debug panel
       plugin.register(new debugPlugin.DebugPanelPlugin, "debugPanel");
    });
}

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

1 participant