From d43b55966ebabc395debd138337454cb19fd0924 Mon Sep 17 00:00:00 2001 From: D See Ker Date: Sun, 8 Nov 2020 22:41:30 +0000 Subject: [PATCH 1/2] #3289 add base path to match publicPath fixes breaking to 404 page in history mode when publicPath sub path is set --- src/router/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/router/index.js b/src/router/index.js index 2be959d2957..54f7d69250c 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -389,6 +389,7 @@ export const asyncRoutes = [ const createRouter = () => new Router({ // mode: 'history', // require service support + // base: process.env.VUE_APP_SRC, // public scrollBehavior: () => ({ y: 0 }), routes: constantRoutes }) From 287bd1793733f2de99ff77863293fb090c838761 Mon Sep 17 00:00:00 2001 From: D See Ker Date: Sun, 8 Nov 2020 22:43:07 +0000 Subject: [PATCH 2/2] Update index.js --- src/router/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/router/index.js b/src/router/index.js index 54f7d69250c..14cfc97ab6a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -389,7 +389,7 @@ export const asyncRoutes = [ const createRouter = () => new Router({ // mode: 'history', // require service support - // base: process.env.VUE_APP_SRC, // public + // base: process.env.VUE_APP_SRC, // use in hitory mode when publicPath is set scrollBehavior: () => ({ y: 0 }), routes: constantRoutes })