|
|
@@ -48,9 +48,26 @@ npm --registry http://registry.npm.taobao.org i
|
|
|
```
|
|
|
npm run serve
|
|
|
```
|
|
|
-> 启动服务后打开浏览器,访问http://localhost:8000
|
|
|
+> 启动服务后打开浏览器,访问 http://localhost:8000
|
|
|
|
|
|
### 项目打包
|
|
|
```
|
|
|
npm run build
|
|
|
```
|
|
|
+> 使用 .env.production 文件中的配置
|
|
|
+>
|
|
|
+> 构建后生成的结果在 dist 目录中
|
|
|
+
|
|
|
+## Nginx 配置
|
|
|
+```
|
|
|
+server {
|
|
|
+ listen 8080;
|
|
|
+ access_log off;
|
|
|
+
|
|
|
+ root /opt/webroot;
|
|
|
+ location / {
|
|
|
+ try_files $uri $uri/ /index.html;
|
|
|
+ }
|
|
|
+}
|
|
|
+```
|
|
|
+> root 指令的路径指向 dist 目录的绝对路径
|