Invalid vue2.0 redirection?

After the

page is refreshed, the recommend page is entered by default. I think there is no problem with the code, but there is no effect after refreshing

.
import Vue from "vue"
import Router from "vue-router"
import Recommend from "components/recommend/recommend.vue"
import Singer from "components/singer/singer.vue"
import Rank from "components/rank/rank.vue"
import Search from "components/search/search.vue"
// vue
Vue.use(Router)
// 
export default new Router({
  routes: [
    {
      path: "/",
      redirect: "/recommend"
    },
    {
      path: "/recommend",
      component: Recommend
    },
    {
      path: "/singer",
      component: Singer
    },
    {
      path: "/rank",
      component: Rank
    },
    {
      path: "/search",
      component: Search
    }
  ]
})
Mar.21,2021

{

  path: '*',
  redirect: '/recommend'

},


hash mode is used by default, and refresh does not change the path. You can use History mode instead, but the deployment of this mode requires backend configuration.

const router = new VueRouter({
  mode: 'history',
  routes: [...]
})

{
  path: '/',
  redirect: 'recommend'
}

the file name at the time of import is different from that at the time of reference

import Vue from 'vue'
import Router from 'vue-router'
//.vue.vue
import Recommend from 'components/recommend/Recommend'   //
import Singer from 'components/singer/Singer'   //
import Rank from 'components/rank/Rank'   //
import Search from 'components/search/Search'   //
// vue
Vue.use(Router)
// 
export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/recommend'
    },
    {
      path: '/recommend',
      component: Recommend       //
    },
    {
      path: '/singer',
      component: Singer       //
    },
    {
      path: '/rank',
      component: Rank       //
    },
    {
      path: '/search',
      component: Search       //
    }
  ]
})
Menu