In my Nuxt JS 2 project, I've set up a session.js
file with the following content:
export default function ({ app, context }, inject) {
console.log('load session')
}
After doing a full page reload, the console.log statement executes. However, when I navigate to a new page, it doesn't run unless I fully reload the page.
What am I missing to ensure it runs on each page change? Here is how it's loaded:
{ mode: 'client', src: '~/plugins/utils/tracking.js' }