Hi,
we are building a Quasar SPA which has to use a CDN. This means, that every asset (generated JS files, images and so on) is deployed to an AWS S3 bucket.
So, I configured the CDN in quasar.conf.js by setting the publicPath:
...
build: {
...
vueRouterMode: 'hash',
publicPath: 'AWS_S3_URL',
...
}
...
This adds a base TAG:
<html>
<head>
<base href="AWS_S3_URL" >
....
So far so good. The problem is, that in case of reloading a page or using the back - button of the browser, the page will be blank and a JS error in the JS console appears:
SecurityError: Blocked attempt to use history.replaceState() to change session history URL from MY_URL to AWS_S3_URL. [...]
And
TypeError: undefined is not an object (evaluating 'l.matched')
It seems, that the CDN URL is causing a couple of problems here with the vue-router.
So, my question is: is there another way to set up a CDN? Is this the intended way to use a CDN by setting a base TAG?
Thanks for your help.
Best regards,
Daniel