Skip to content

Commit

Permalink
🚸 show app version
Browse files Browse the repository at this point in the history
  • Loading branch information
vinicius73 committed Sep 28, 2020
1 parent c6d7d43 commit 4717d3c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/components/AppFooter.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script>
export default {
name: 'AppFooter'
name: 'AppFooter',
version: process.env.VUE_APP_VERSION
}
</script>

Expand All @@ -11,6 +12,9 @@ export default {
Feito pelos membros do <a href="https://t.me/vuejsbrasil" target="_blank">Vue.js Brasil</a>.<br>
Conheça as nossas <a href="https://github.com/vuejs-br/comunidades" target="_blank">comunidades</a>.
</p>
<p class="has-text-info is-size-7">
{{ $options.version }}
</p>
</div>
</footer>
</template>
11 changes: 9 additions & 2 deletions vue.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const HtmlWebpackInlineSourcePlugin = require('webpack-inline-modern-source-plugin')

process.env.VUE_APP_VERSION = require('./package.json').version
const pkg = require('./package.json')

process.env.VUE_APP_VERSION = `v${pkg.version}@${Date.now().toString('36')}`

const isProd = (process.env.NODE_ENV === 'production')

Expand All @@ -15,8 +17,13 @@ module.exports = {
msTileColor: '#35495e',
appleMobileWebAppCapable: 'yes',
appleMobileWebAppStatusBarStyle: 'black',
assetsVersion: pkg.version,
workboxOptions: {
skipWaiting: true
cacheId: `${pkg.name}@${pkg.version}`,
clientsClaim: true,
skipWaiting: true,
cleanupOutdatedCaches: true,
exclude: /(_redirects|_headers|cover.png|robots.txt|icons\/apple)/
}
},
chainWebpack (config) {
Expand Down

0 comments on commit 4717d3c

Please sign in to comment.