File tree 3 files changed +24
-4
lines changed
3 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -82,5 +82,25 @@ npm run build --report
82
82
├── ...
83
83
```
84
84
85
+ ## Nginx简单部署配置
86
+ ```
87
+ ...
88
+ # 以上保持默认配置即可
89
+
90
+ server {
91
+ listen 9090;
92
+ server_name localhost;
93
+ # 项目文件目录
94
+ root html/vue-backend;
95
+ index index.html index.htm;
96
+
97
+ location / {
98
+ # vue-router使用history模式下的必须配置
99
+ try_files $uri $uri/ /index.html;
100
+ index index.html;
101
+ }
102
+ }
103
+ ```
104
+
85
105
## 其他
86
106
欢迎反馈及探讨各种问题,同时请注意issue规则
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ module.exports = {
9
9
index : path . resolve ( __dirname , '../dist/index.html' ) ,
10
10
assetsRoot : path . resolve ( __dirname , '../dist' ) ,
11
11
assetsSubDirectory : 'static' ,
12
- assetsPublicPath : '. /' ,
12
+ assetsPublicPath : '/' ,
13
13
productionSourceMap : false ,
14
14
// Gzip off by default as many popular static hosts such as
15
15
// Surge or Netlify already gzip all static assets for you.
Original file line number Diff line number Diff line change 1
1
import Vue from 'vue'
2
2
import VueRouter from 'vue-router'
3
- import store from '../store'
4
3
import NProgress from 'nprogress'
5
4
import 'nprogress/nprogress.css'
5
+ import { Message } from 'element-ui'
6
+ import Auth from '@/util/auth'
7
+ import store from '../store'
6
8
import staticRoute from './staticRoute'
7
9
import { asyncLayout , asyncRoute , redirectRoute } from './asyncRoute'
8
10
import whiteList from './whiteList'
9
- import Auth from '@/util/auth'
10
- import { Message } from 'element-ui'
11
11
12
12
NProgress . configure ( { showSpinner : false } ) ;
13
13
You can’t perform that action at this time.
0 commit comments