记一次vue-cli3项目打包后不出东西的解决

1.vue.config.js里面:

module.exports = {
    publicPath: "./",
}

2.router.js里面注释:

export default new Router({
    // mode: "history",
    // base: process.env.BASE_URL,
    routes: [
        {
            path: "/",
            name: "index",
            component: () => import ("@/pages/Index.vue")
        },
        {
            path: "/about",
            name: "about",
            component: () => import ("@/pages/About.vue")
        }
    ]
});

你可能感兴趣的:(记一次vue-cli3项目打包后不出东西的解决)