You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
|
|
## 项目启动
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
|
|
# 安装依赖
|
|
|
|
pnpm install
|
|
|
|
|
|
|
|
# 启动运行
|
|
|
|
pnpm run dev
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 项目部署
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# 项目打包
|
|
|
|
pnpm run build:prod
|
|
|
|
|
|
|
|
# 上传文件至远程服务器
|
|
|
|
将打包生成在 `dist` 目录下的文件拷贝至 `/usr/share/nginx/html` 目录
|
|
|
|
|
|
|
|
# nginx.cofig 配置
|
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
server_name localhost;
|
|
|
|
location / {
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
index index.html index.htm;
|
|
|
|
}
|
|
|
|
# 反向代理配置
|
|
|
|
location /prod-api/ {
|
|
|
|
proxy_pass http://xxx.xxx.xx/;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## 注意事项
|
|
|
|
|
|
|
|
- **自动导入插件自动生成默认关闭**
|
|
|
|
|
|
|
|
模板项目的组件类型声明已自动生成。如果添加和使用新的组件,请按照图示方法开启自动生成。在自动生成完成后,记得将其设置为 `false`,避免重复执行引发冲突。
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|