Add Version HTML file in url of routes

Hello everyone,

I need to specify the version of the HTML file that i call in url parameter of routes because if not specified the file goes into cache.

the problem is that if I specify the url like this
{
name: ‘home’,
path: ‘/home/’,
url: ‘./index.html?v=’ + versionString
},

The problem is that if i put the url as this “”, the variable will seen as null and not like the real value

How can i do it?
Thanks

How about:

{
name: 'home',
path: '/home/',
url: './index.html',
}

And then use:

var version = 'v1';
const url = router.generateUrl({
  name: 'home',
  query: { versionString: version }
});
console.log(url); /* /index.html?versionString=v1 */