21
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
zpc 2026-03-29 22:05:51 +08:00
parent e9bdf2623a
commit b63139b5ae
4 changed files with 10 additions and 6 deletions

View File

@ -52,6 +52,8 @@ steps:
tags:
- latest
- ${DRONE_COMMIT_SHA:0:8}
cache_from:
- 192.168.195.25:19900/xiangyixiangqin/admin-web:latest
username:
from_secret: harbor_username
password:

View File

@ -3,13 +3,13 @@ FROM 192.168.195.25:19900/library/node:20-alpine AS build
WORKDIR /app
# 复制 package 文件
COPY package*.json ./
# 先复制依赖文件,利用 Docker 层缓存
COPY package.json package-lock.json ./
# 删除 lock 文件并重新安装
RUN rm -f package-lock.json && npm install
# 设置淘宝镜像源加速下载,使用 npm ci 严格按 lock 文件安装
RUN npm config set registry https://registry.npmmirror.com && npm ci
# 复制源代码
# 复制源代码(依赖没变时上面的层会命中缓存)
COPY . .
# 构建应用

View File

@ -5,7 +5,8 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "vue-tsc -b && vite build",
"build": "vite build",
"build:check": "vue-tsc -b && vite build",
"preview": "vite preview",
"lint": "eslint . --fix",
"format": "prettier --write src/",

View File

@ -50,6 +50,7 @@ export default defineConfig(({ mode }) => {
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler',
additionalData: `@use "@/assets/styles/variables.scss" as *;`
}
}