We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I would expect this to work:
import * as Box2D from 'phaser-box2d' // do stuff with Box2D here, e.g., Box2D.b2CreateWorldArray() const worldDef = Box2D.b2DefaultWorldDef()
This fails. Looking at package.json it's got "main": "index.js" Should this instead be something like "main": "dist/PhaserBox2D.js" ?
package.json
"main": "index.js"
"main": "dist/PhaserBox2D.js"
It's unintuitive, having to write:
import * as Box2D from 'phaser-box2d/dist/PhaserBox2D.js'
The text was updated successfully, but these errors were encountered:
Funnily enough, I asked for the same thing in the #box2d channel in the Discord at about the same time you opened this issue.
Instinctively, it makes sense to me to set main to "src/main.js", unless there's a reason to prefer a pre-built version?
"src/main.js"
Sorry, something went wrong.
The pre-built version doesn't have any expensive console assertions in it (or the weighty debug renderer).
buildtypes
d0fb7a7
Merge pull request #9 from mreinstein/main
bf7e088
refactor: make most common import case work. fixes #6
No branches or pull requests
I would expect this to work:
This fails. Looking at
package.json
it's got"main": "index.js"
Should this instead be something like"main": "dist/PhaserBox2D.js"
?It's unintuitive, having to write:
The text was updated successfully, but these errors were encountered: