@devops-web/appversion

0.0.2 • Public • Published

前端打包过程中给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>

Readme

Keywords

none

Package Sidebar

Install

npm i @devops-web/appversion

Weekly Downloads

1

Version

0.0.2

License

ISC

Unpacked Size

2.27 kB

Total Files

3

Last publish

Collaborators

  • devopsweb
  • fangwenzheng