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

Provide instructions for usage with babel #185

Closed
heygrady opened this issue Mar 7, 2017 · 1 comment
Closed

Provide instructions for usage with babel #185

heygrady opened this issue Mar 7, 2017 · 1 comment

Comments

@heygrady
Copy link

heygrady commented Mar 7, 2017

There are issues with how the random number generator code is implemented. It fails with default settings in browserify and babel. (See #172)

There are a number of issue that describe the problem but none that detail the solution.

  • There should be notes in the main readme for usage with popular packaging setups, like babel.
  • The code should be patched so that it doesn't break by default.

The offending line is relying on global being defined as window. For some reason global === undefined when this library is included in another project and compiled using babel/webpack.

@dessant
Copy link

dessant commented Jun 14, 2017

I can second this, after commenting out that line, my webpack bundle does not throw this error anymore:

TypeError: modules[moduleId] is undefined[Learn More]  manifest.bundle.js:55:12

Defining global is also a workaround: webpack/webpack#1887 (comment)

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

2 participants