This commit is contained in:
Olivier Gagnon
2021-12-16 20:07:34 -05:00
parent 3436873373
commit 99f3566e52
10 changed files with 55 additions and 35 deletions
+2 -5
View File
@@ -44,10 +44,7 @@ module.exports = (env, argv) => {
// Get the current commit hash to inject into the app
// https://stackoverflow.com/a/38401256
const commitHash = require('child_process')
.execSync('git rev-parse --short HEAD')
.toString()
.trim();
const commitHash = require("child_process").execSync("git rev-parse --short HEAD").toString().trim();
return {
plugins: [
@@ -113,7 +110,7 @@ module.exports = (env, argv) => {
},
}),
new webpack.DefinePlugin({
__COMMIT_HASH__: JSON.stringify(commitHash)
__COMMIT_HASH__: JSON.stringify(commitHash || "DEV"),
}),
// In dev mode, use a faster method of create sourcemaps
// while keeping lines/columns accurate