Skip to content

UMD is broken #14

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

Closed
Hypercubed opened this issue Nov 18, 2015 · 3 comments
Closed

UMD is broken #14

Hypercubed opened this issue Nov 18, 2015 · 3 comments

Comments

@Hypercubed
Copy link
Contributor

The browserify generated UMD files are broken by appendVersion in your bundle task. For CommonJS loading systems Plotly in the last line of plotly.js and plotly.min.js (Plotly.version='1.0.0';) is undefined.

P.S. Great work! Thanks for making this open source.

@etpinard
Copy link
Contributor

@Hypercubed thank you so much for bringing this up.

I was about to use https://github.com/webpro/versionify to add the package.json version on the exported object, but got scared off by webpro/versionify#11 so I decided to come up with a my own ad hoc routine.

Can you recommend an other way of adding the version on the bundle's exported object?

@Hypercubed
Copy link
Contributor Author

Sorry, I can't think of an easy way off the top of my head. I usually don't include version numbers in dist files. Plus doesn't this introduce an inconsistency between the CommonJS version and the dist version?

etpinard added a commit that referenced this issue Nov 18, 2015
- appending `Plotly.version` is the bundle break UMD
  more info: #14
@Hypercubed
Copy link
Contributor Author

I can confirm that UMD in the fix-umd branch (after npm run build) works (loading using SystemJS).

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