|
|
@ -12,6 +12,15 @@ const common = require("./webpack.common.js"); |
|
|
|
const attachments = require("./attachments"); |
|
|
|
const attachments = require("./attachments"); |
|
|
|
const components = require("./components"); |
|
|
|
const components = require("./components"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const childProcess = require('child_process'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function git(command) { |
|
|
|
|
|
|
|
return childProcess |
|
|
|
|
|
|
|
.execSync(`git ${command}`) |
|
|
|
|
|
|
|
.toString() |
|
|
|
|
|
|
|
.trim(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
module.exports = merge.smart(common, { |
|
|
|
module.exports = merge.smart(common, { |
|
|
|
mode: "production", |
|
|
|
mode: "production", |
|
|
|
entry: { |
|
|
|
entry: { |
|
|
@ -63,7 +72,11 @@ module.exports = merge.smart(common, { |
|
|
|
} |
|
|
|
} |
|
|
|
}), |
|
|
|
}), |
|
|
|
new webpack.BannerPlugin({ |
|
|
|
new webpack.BannerPlugin({ |
|
|
|
banner: `time: ${new Date().toLocaleString()}` |
|
|
|
banner: `time: ${new Date().toLocaleString()}; branch: ${git( |
|
|
|
|
|
|
|
'rev-parse --abbrev-ref HEAD' |
|
|
|
|
|
|
|
)} commit: ${git( |
|
|
|
|
|
|
|
'rev-parse HEAD' |
|
|
|
|
|
|
|
)}` |
|
|
|
}) |
|
|
|
}) |
|
|
|
] |
|
|
|
] |
|
|
|
}, |
|
|
|
}, |
|
|
|