How to configure PWA to work under a subdomain
Hello, I just finished a small project using quasar 0.15.2 and now it’s time to deploy it.
I am deploying it on a subdomain, for example
https://example.com/myproyect. The problem is that the template is trying to fetch all the resources from absolute paths from the root of the domain, so it is trying to reach things like
https://example.com/js/app.54165164.jswhen it should be
Where is the correct place to configure this ? How can I make the paths relative so I don’t have to re-build the app every time I change the subdomain ?
Thanks in advance.
Taking a look at the index.js of the router I noticed that it mentions the following property :
build.publicPath. Setting that property to my subdomain fixed all my problems. It was very hard to find about it because the only places where it is mention are under the CLI documentation and and
configuring quasarand none of them mentions the subdomain thing, which I think they should.
Will not make a doc page for each setting. Just take a look at quasar.conf page – which is ESSENTIAL when getting to know Quasar – and notice how many they are. Skipping quasar.conf page is like skipping half of Quasar.