You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No, I used a different method to get the git hash which worked for me. I created a gitHash key in package.json which I update via an npm script: "update-git-hash": "npx json -I -f package.json -e 'this.gitHash=\"$(git rev-parse --short HEAD)\"'".
This way I can run that script in my Github action before building and distributing my app for QA, and have it display the correct info in my app—I reference it through import { gitHash } from '../package.json'. The default value I have for this gitHash key is "dev" because the specific hash isn't important during development, I only needed it for QA distributions.
babel-plugin-preval
version: 5.1.0node
version: 16.12.0npm
(oryarn
) version: 8.4.1Relevant code or config
My
babel.config.js
file:What you did: I'm trying to use preval to get the git hash and have it displayed in the app.
What happened:
ReferenceError: Can't find variable: preval
I'm not sure if there's any additional steps I need to take to have this work in React Native.
The text was updated successfully, but these errors were encountered: