Cannot GET /app
来源:6-1 notification之基本组件实现

错爱谁
2018-06-14
http://localhost:3333/app 访问正常 但到http://localhost:8000/app就提示Cannot GET /app
create-app.js :
import Vue from 'Vue' import VueRouter from 'vue-router' import Vuex from 'vuex' import Meta from 'vue-meta' import App from './app.vue' import createStore from './store/store' import createRouter from './config/router' import Notification from './components/notification' import './assets/styles/global.styl' Vue.use(VueRouter) Vue.use(Vuex) Vue.use(Meta) Vue.use(Notification) export default () => { const router = createRouter() const store = createStore() const app = new Vue({ router, store, render: h => h(App) }) return { app, router, store } }
client-entry.js :
import createApp from './create-app' const { app, router } = createApp() router.onReady(() => { app.$mount('#root') })
写回答
2回答
-
你的dev-server没有配置historyApiFallback吧
072018-06-22 -
慕无忌6890528
2019-04-18
historyApiFallback: { index: '/pubilc/index.html' },
这里的路径写错了应该是:
historyApiFallback: {
index: '/index.html'
},
10
相似问题