-
√ 配置多环境变量
-
√ 配置基础 vue.config.js
-
√ 配置 proxy 跨域
-
√ 图片压缩
-
√ gzip压缩
-
√ 发布环境去除console
-
√ 支持使用svg图片
-
√ sprites 精灵图自动合成,支持分组
-
√ 静态mock功能,api模块化功能
-
√ scss 常用函数,类
- √ 登陆功能
- √ 多语言
- √ 侧边栏
- √ tweenjs补间动画
- 右键菜单
- 全站CDN加速
yarn install
yarn run serve
yarn run build
yarn run test
yarn run lint
yarn run test:unit
#user nobody;
worker_processes 2;
#工作模式及连接数上线
events {
worker_connections 1024; #单个工作进程 处理进程的最大并发数
}
http {
include mime.types;
default_type application/octet-stream;
#sendfile 指令指定 nginx 是否调用 sendfile 函数(zero copy 方式)来输出文件,对于普通应用,
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
# 开启GZIP
gzip on;
# # 监听 80 端口,转发请求到 3000 端口
server {
#监听端口
listen 80;
#编码格式
charset utf-8;
# 前端静态文件资源
location / {
root /usr/src/app;
index index.html index.htm;
try_files $uri $uri/ @rewrites;
}
# 配置如果匹配不到资源,将url指向 index.html, 在 vue-router 的 history 模式下使用,就不会显示404
location @rewrites {
rewrite ^(.*)$ /index.html last;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}