0.0.2 • Published 3 years ago

@devops-web/appversion v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

前端打包过程中给index.html中添加打包信息

使用方式

npm i @devops-web/appversion
// vue.config.js
const AppVersion = require('@devops-web/appversion')
module.exports = {
  configureWebpack: {
    plugins:[
      new AppVersion()
    ]
  }
}

效果

// 打包后dist目录中index.html会出现以下代码
<script>
  window.AppVersion = { 
    "commmitId": "951f00111d56e0a81a371f399cfddc7696e9e8cb", 
    "commitDate": "2021/12/24 下午4:43:37", 
    "branch": "bugfix-68810\n", 
    "packageDate": "2021/12/24 下午5:34:30" 
  }
</script>