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

Use require for poly-decomp #160

Closed
liabru opened this issue Oct 6, 2015 · 2 comments
Closed

Use require for poly-decomp #160

liabru opened this issue Oct 6, 2015 · 2 comments

Comments

@liabru
Copy link
Owner

liabru commented Oct 6, 2015

Use require for poly-decomp. But do not include poly-decomp in the build for Matter.js. Ensure that this also works in a browser, where poly-decomp is required separately.

@liabru liabru mentioned this issue Oct 6, 2015
@donaldpipowitch
Copy link

I use it with webpack in this way for now:

import decomp from 'poly-decomp';
import { Engine, World, Bodies, Svg, Vertices } from 'matter-js';

window.decomp = decomp;

(By the way: Using webpack gives a warning This seems to be a pre-built javascript file. (build/matter.js 32:479-486). I don't know if this can make problems in Browserify/webpack environments, because there seems to be a require fallback.)

@liabru
Copy link
Owner Author

liabru commented Dec 2, 2016

Solved as of c72a9d0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants