universal-vue / uvue

Vue CLI plugin to create universal Vue applications with ease
https://universal-vue.github.io/docs/
MIT License
127 stars 13 forks source link

how to set publicPath for ssr:build #23

Closed xurwxj closed 5 years ago

xurwxj commented 5 years ago

how to set publicPath for ssr:build? don't work with following in vue.config.js:

module.exports = {
    publicPath:"/test/"
  }

i need to replace publicPath after build when static resources such as js/css/fonts/images have been uploaded to cdn. above settings will replace all link include router link. all router link will add /test/ as prefix. can i set base url for all router link? i need to exclude router link.

xurwxj commented 5 years ago

solved by following:

module.exports = {
    configureWebpack:config => {
        config.output.publicPath = "/";
    }
  }