Skip to content

Commit acbb632

Browse files
committed
前端项目本地构建打包,配合Nginx路径访问
1 parent 08a7aad commit acbb632

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ yarn-error.log*
2020
*.sln
2121
*.sw*
2222
package-lock.json
23+
24+
.MockServer
25+
yarn.lock

src/router/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { constantRouterMap } from '@/config/router.config'
12
import Vue from 'vue'
23
import Router from 'vue-router'
3-
import { constantRouterMap } from '@/config/router.config'
44

55
// hack router push callback
66
const originalPush = Router.prototype.push
@@ -14,6 +14,7 @@ Vue.use(Router)
1414
const createRouter = () =>
1515
new Router({
1616
mode: 'history',
17+
base: '/ant-design-vue-pro',
1718
routes: constantRouterMap
1819
})
1920

vue.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const assetsCDN = {
4040

4141
// vue.config.js
4242
const vueConfig = {
43+
publicPath: '/ant-design-vue-pro',
4344
configureWebpack: {
4445
// webpack plugins
4546
plugins: [

0 commit comments

Comments
 (0)