Browse Source

Pull request #134404: 无JIRA任务 打包加上hash

Merge in DEC/fineui from ~TELLER/decision_fineui:final/11.0 to final/11.0

* commit '638dcc66ce455192118ae49e12f7ead4c2fcf50b':
  chore: 打包加上hash
master
Teller 2 years ago
parent
commit
105c24d634
  1. 15
      webpack/webpack.prod.js

15
webpack/webpack.prod.js

@ -12,6 +12,15 @@ const common = require("./webpack.common.js");
const attachments = require("./attachments");
const components = require("./components");
const childProcess = require('child_process');
function git(command) {
return childProcess
.execSync(`git ${command}`)
.toString()
.trim();
}
module.exports = merge.smart(common, {
mode: "production",
entry: {
@ -63,7 +72,11 @@ module.exports = merge.smart(common, {
}
}),
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'
)}`
})
]
},

Loading…
Cancel
Save