DEV Community

Discussion on: Add commit hash version to your React app

achoarnold profile image
αςнο αяηοℓδ • Edited on


The default installation when I use CreateReactApp doesn't include the webpack.config.js file. Do you know how I can work around that to get this to work?

I finally found a workaround to get this to work on windows. The command looks something like this

git rev-parse HEAD >sha.txt && set /p REACT_APP_COMMIT_HASH= < sha.txt && del sha.txt && react-scripts start
Enter fullscreen mode Exit fullscreen mode