publicPath for dev in V2



  • Since in V2 publicPath for dev is taken from build, how to set it up for dev ?

    devServer: {
        publicPath: '/'
      }
    

    that does not work, no matter what it takes it from build:



  • this works:

    build: {
          vueRouterMode: 'history', // available values: 'hash', 'history'
          publicPath: process.env.NODE_ENV === 'development' ? '/' : '/productionPath',
    }
    

    but not in devServer


Log in to reply