vol.vue3
Project setup
npm install
Compiles and hot-reloads for development
npm run serve
Compiles and minifies for production
npm run build
npm run build 会自动生成当前时间目录,并上传到阿里云 OSS。默认规则:
- 本地产物目录:
.oss-build/<YYYYMMDDHHmm> - OSS 目录:
static/web/samart-static/<YYYYMMDDHHmm>/ - 资源访问前缀:
https://yuedong-wechatapplet.oss-cn-shanghai.aliyuncs.com/static/web/samart-static/<YYYYMMDDHHmm>/
上传前需要配置环境变量:
OSS_ACCESS_KEY_ID=你的AccessKeyId
OSS_ACCESS_KEY_SECRET=你的AccessKeySecret
可选环境变量:
OSS_BUCKET=yuedong-wechatapplet
OSS_REGION=oss-cn-shanghai
OSS_PREFIX=static/web/samart-static
OSS_ENDPOINT=yuedong-wechatapplet.oss-cn-shanghai.aliyuncs.com
OSS_PUBLIC_BASE=https://yuedong-wechatapplet.oss-cn-shanghai.aliyuncs.com/static/web/samart-static/自定义目录/
BUILD_TIMESTAMP=202607061710
BUILD_OUT_DIR=.oss-build/202607061710
只验证打包、不上传:
npm run build -- --skip-upload
也可以使用:
npm run build:local
只做原始 Vite 打包:
npm run build:vite
Run your unit tests
npm run test:unit
Lints and fixes files
npm run lint
Customize configuration
Description
Languages
Vue
69.8%
JavaScript
27%
Less
2%
TypeScript
0.6%
SCSS
0.3%
Other
0.2%