Skip to content

Version is not set when using via CommonJS. #459

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
jgerigmeyer opened this issue Jan 8, 2016 · 3 comments
Closed

Version is not set when using via CommonJS. #459

jgerigmeyer opened this issue Jan 8, 2016 · 3 comments

Comments

@jgerigmeyer
Copy link
Contributor

What is the correct way to load version 2.0.1 via CommonJS (or a bundler)? package.json now points to src/singleton.js, which results in Raven.VERSION being set to __VERSION__ instead of 2.0.1. Is it expected that users will load dist/raven.js instead?

@benvinegar
Copy link
Contributor

It should probably be dist/raven.js. I forgot that there are some final built things like the version.

I'll make an update.

@jgerigmeyer
Copy link
Contributor Author

👍

@benvinegar
Copy link
Contributor

Okay, just experimented w/ this. It's not as simple as just pointing to dist/raven.js – Browserify wants to look up the original src files, whose paths don't match up because of the new raven.js location.

benvinegar added a commit that referenced this issue Jan 12, 2016
Fix version not available via CommonJS (fixes #459) ...
benvinegar added a commit that referenced this issue Jan 12, 2016
* package.json now points to dist/raven.js
* dist/raven.js is built with derequire plugin (removes require statements)
* derequire plugin added as dev dep
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