static page error occurs after npm run bulid output
main.js Code
import Vue from "vue"
import App from "./App"
import VueRouter from "vue-router"
import routes from "./router"
Vue.use(VueRouter)
// Vue.config.productionTip = false
const router = new VueRouter({
mode: "history",//-sharp
routes
})
/* eslint-disable no-new */
new Vue({
el: "-sharpapp",
router,
components: { App },
template: "<App/>"
})
router.js Code
import Index from "@/views/index"
import Settled from "@/views/settled"
// const Index = () => import(/* webpackChunkName: "group-Index" */ "@/views/index");
// const Settled = () => import(/* webpackChunkName: "group-Settled" */ "@/views/settled");
let routes = [
{
path: "/",
name: "",
component: Index
},
{
path: "/settled",
name: "",
component: Settled
},
{
path: "*",
hidden: true,
redirect: { path: "/404" }
}
]
export default routes;