No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    How to configure PWA to work under a subdomain

    Help
    2
    3
    1371
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      danielo515 last edited by

      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.js when it should be https://example.com/myproject/js/app.54165164.js.
      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.
      Regards

      1 Reply Last reply Reply Quote 0
      • D
        danielo515 last edited by

        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 quasar and none of them mentions the subdomain thing, which I think they should.

        1 Reply Last reply Reply Quote 0
        • rstoenescu
          rstoenescu Admin last edited by rstoenescu

          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.

          0_1521310537688_download (1).png

          1 Reply Last reply Reply Quote 0
          • First post
            Last post