Sh031224
Sh031224

Reputation: 809

(Vue.js) On the github page, the inside of '#app' is empty

import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/views/Home.vue'
import Load from '@/views/Load.vue'
import Login from '@/views/Login.vue'
import Main from '@/views/Main.vue'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [{
    path: '/',
    name: 'home',
    component: Home
  },
  {
    path: '/load',
    name: 'loading',
    component: Load
  },
  {
    path: '/login',
    name: 'login',
    component: Login
  },
  {
    path: '/main',
    name: 'main',
    component: Main
  }]
})

I connected the router correctly.

But https://sh031224.github.io/portfolio/ the inside of '#app' is empty.

How can I do?

My github is https://github.com/Sh031224/portfolio And github page is https://sh031224.github.io/portfolio/

Upvotes: 1

Views: 185

Answers (1)

Michal Levý
Michal Levý

Reputation: 37883

You need to set base in your router configuration to "/portfolio/"

See the docs

Upvotes: 1

Related Questions