-
Notifications
You must be signed in to change notification settings - Fork 25
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
__VERSION__ undefined when import from node_modules #4
Comments
Any suggestions on how to fix this? Also, I'm not sure how to test it either. I thought node used requirejs and didn't support native ES6 modules yet? |
1 way (simple and fast) you can reference in 2 way Don't use VERSION from package.json (define const by yourself) or dont use VERSION at all in code 3 way (insecure) Import package.json and use VERSION realtime 4 way (the best)! :) Reconfigure ur make scripts for Development version to inject VERSION variable as we see in production code: _this.VERSION = "1.1.12"; |
Any resolution on this?
|
OK I'm still trying to understand this issue and I'm not sure what I need to change. @lokhmakov provided four ways but that's four things I don't understand. "You can reference in package.json"? What does that mean? Change the Also, the Makefile already injects the version variable... So obviously it's not doing it in the way you suggest. Can someone just provide a pull request? |
Any news ? |
would be interested as well |
import HumanInput from 'humaninput' const hi = new HumanInput(window) hi.on('a', () => console.log(12345))
__VERSION__
__VERSION__
The text was updated successfully, but these errors were encountered: