1.0.3 • Published 5 years ago

vue-cli-plugin-version v1.0.3

Weekly downloads
60
License
ISC
Repository
-
Last release
5 years ago

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'
    }
  }
}
1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago