I have code that when viewing it in a local server the routing works fine, but when after I push it to github it gets broken. It dosen't load the adjective page from the start and I can't click to the rhymesaurus page. any ideas?
app.vue
<div id="app">
<h1>Fun With Datamuse</h1>
<router-link to="/">Adjective For Noun</router-link>
<p></p>
<router-link to="/rhymesaurus">Rhymesaurus</router-link>
<router-view/>
</div>
</template>
<script>
import Adjective from './views/Adjective.vue'
export default {
components: { Adjective },
name: 'app'
}
</script>
Router.js
import { createRouter, createWebHistory } from 'vue-router'
// Vue.use(Router)
const routes = [
// { path: '/', redirect: '/adjective' },
{
path: '/',
name: 'Adjective',
component: () => import('./views/Adjective.vue')
},
{
path: '/rhymesaurus',
name: 'Rhymesaurus',
component: () => import('./views/Rhymesaurus.vue')
}
]
const router = createRouter({
history: createWebHistory(process.env.BASE_URL),
routes
})
export default router
link to page https://dougjones866.github.io/the-rhymesaurus/