How do I get my base url to change in Vue/Cli

Viewed 6860
module.exports = {
  publicPath: './src/pages/home/Homepage.vue',
  pages: {
    'Home': {
      entry: 'src/pages/home/main.js',
      template: 'public/index.html',
      title: 'Home page',
      chunks: [ 'chunk-vendors', 'chunk-common', 'Home' ]
    },
    'Map': {
      entry: 'src/pages/map/main.js',
      template: 'public/index.html',
      title: 'Map page',
      chunks: [ 'chunk-vendors', 'chunk-common', 'Map' ]
    }
  }
}

My app can't seem to get my home page. Am I using the public path correctly? For reference, this is a multipage app. I'm not sure what I should set my base url to since this is the first time I've made anything with Vue. I'm using Vue/Cli. It runs, but says it cannot get my linked page. How do I fix this?

1 Answers

publicPath is for deployment only - it is not path to your (DEV) file system but path following the domain name when the app is deployed.

Documentation

By default, Vue CLI assumes your app will be deployed at the root of a domain, e.g. https://www.my-app.com/. If your app is deployed at a sub-path, you will need to specify that sub-path using this option. For example, if your app is deployed at https://www.foobar.com/my-app/, set publicPath to '/my-app/'

Related