Help us understand the problem. What is going on with this article?

browserifyでビルドした時のgitのコミットハッシュを埋め込む

More than 5 years have passed since last update.

envifyを使う

index.js
console.log(process.env.GIT_HASH);
$ npm install -g browserify envify
$ broserfy -t [envify --GIT_HASH $(git rev-parse HEAD)] index.js > bundle.js
plaid
CXプラットフォーム「KARTE」の開発・運営、EC特化型メディア「Shopping Tribe」の企画・運営、CX特化型メディア「XD(クロスディー)」の企画・運営
https://plaid.co.jp/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away