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

    Quasar in subfolder issue with hot reload - sockjs.js

    Help
    3
    6
    381
    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.
    • K
      karamcelwrath last edited by

      Hello, I’m developing and running a Quasar project in a subfolder:

      Ex: https://apps.mydomain.com/project1

      I have set publicPath: ‘/project1/’ in the build object of the quasar.conf.js

      The app is working well except the hot reload sockjs.js call fails with a 404 error on the console because it is not using the subfolder, instead it is loading the sockjs-node/info call from the root of the domain:

      sockjs.js?b1aa:1606 GET https://apps.mydomain.com/sockjs-node/info?t=1599256287869 404 (Not Found)

      What do I need to do to make the sockjs.js hot reload work when running a project in a subfolder environment?

      Thanks in advance.

      dobbel 1 Reply Last reply Reply Quote 0
      • dobbel
        dobbel @karamcelwrath last edited by dobbel

        @karamcelwrath said in Quasar in subfolder issue with hot reload - sockjs.js:

        hot reload

        I can imagine that hot reload is only intended to work in development environment, not on an actual domain with sub folders like yours.

        Why do you develop on an actual domain in a sub folder in the first place?

        1 Reply Last reply Reply Quote 0
        • K
          karamcelwrath last edited by

          Good point. I like to develop under the same variables as how prod is going to be. It’d be nice to get the hot reload to work with subfolders in dev. There has to be a way. Anyone know how?

          dobbel 1 Reply Last reply Reply Quote 0
          • dobbel
            dobbel @karamcelwrath last edited by

            @karamcelwrath

            Ah like that I understand. I think the hot reload is a feature Webpack delivers. So you could look there for more information:

            https://webpack.js.org/configuration/dev-server/

            1 Reply Last reply Reply Quote 0
            • F
              fwarren last edited by

              I have this working. Edit quasar.config.js and add to the devServer: {} block your desired path. In the example below I want the app served from /admin

              build: {
                vueRouterMode: 'hash, // available values: 'hash', 'history'
                publicPath: '/admin',
                ....
              },
              
              devServer: {
                  sockPath: '/admin/sockjs-node',
                  ....
              }
              1 Reply Last reply Reply Quote 0
              • F
                fwarren last edited by

                I also found that when proxying with nginx I had to completely stop and restart serving the app in dev mode to make changes to sockPath.

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