vue-cli-plugin-version
v1.0.3
Published
version plugin for vue cli3
Downloads
41
Readme
VUE-CLI3-PLUGIN-VERSION
usage
- create vue.config.js
const path = require('path')
// set version.js to path
function resolve (dir) {
return path.join(__dirname, dir)
}
// when process env is production then it set process env VERSION
if (process.env.NODE_ENV === 'production') {
const VERSION = new Date().getTime()
process.env.VERSION = VERSION
}
// you can set version plugin options, path env and versionDirectory
module.exports = {
pluginOptions: {
versionOptions: {
path: resolve('dist'),
env: process.env,
versionDirectory: 'static'
}
}
}