Navigation

    Quasar Framework

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

    publicPath proprety not working in devServer

    CLI
    2
    2
    705
    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.
    • S
      stansab last edited by stansab

      I want to serve my application on localhost:3001/admin in development environment.
      I put the following config :

              build: {
                  scopeHoisting: true,
                  vueRouterMode: 'history',
                  publicPath: "/admin/" 
              },
              devServer: {
                  publicPath: "/admin/", 
                  port: 3001,
                  proxy: {
                      // proxy all requests starting with /api
                      '/api': {
                          target: 'http://localhost:8080',
                          changeOrigin: true,
                      }
                  }
              },
      

      application responds on localhost:3001/admin but failed to load app.js because it looks at localhost:3001/app.js instead of localhost:3001/admin/app.js

      1 Reply Last reply Reply Quote 0
      • C
        chbarr last edited by

        same problem for me.
        It seems that we can’t set a publicPath during development

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