[Vuejs]-Nuxt.js – console.log build version

0👍

This is a bit of a tumbleweed. Here’s what I did:

A plugin to print the manifest hash:

```
// Statup and small stuff
window.onNuxtReady(() => {
  // Print build version of this script
  var scripts = window.document.getElementsByTagName('script')
  for (var i=0; i < scripts.length; i++) {
    // Get the script name
    var src = scripts[i].src
    src = src.substr(src.lastIndexOf('/') + 1)
    if (src && src.startsWith('manifest')) console.log('Hello ' + src)
  }
})

```

Added to nuxt.config.js

```
  plugins: [
    'plugins/bootstrap-vue.js',
    'plugins/scroll.js',
    { ssr: false, src: '~plugins/etc.js' },
  ]
```

Leave a comment