kripken / box2d.js

Port of Box2D to JavaScript using Emscripten
1.33k stars 196 forks source link

How does this work with webpack? #116

Open Erfa opened 3 years ago

Erfa commented 3 years ago

I've tried to import this with webpack, but as far as I can tell there is no package.json? What is the intended way to bundle this with the rest of your app?

probityrules commented 3 years ago

I'm not sure the intended way, but we dropped the minified file into our source folder and added something like export default Box2D; in order to get it webpacked. Not the cleanest, but it works 😬.