Master #1

Open
cnbugs wants to merge 20 commits from master into 0.0.1
3 changed files with 3 additions and 15 deletions
Showing only changes of commit 6076e174d5 - Show all commits
+1 -1
View File
@@ -4,8 +4,8 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"predev": "rm -rf node_modules/.vite",
"dev": "node node_modules/vite/bin/vite.js",
"dev:clean": "rm -rf node_modules/.vite && node node_modules/vite/bin/vite.js --force",
"build": "node node_modules/vite/bin/vite.js build",
"preview": "node node_modules/vite/bin/vite.js preview"
},
-12
View File
@@ -11,18 +11,6 @@ export default defineConfig({
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
// 显式预构建 element-plus,避免 Vite 缓存过期后
// 出现 "Failed to resolve entry for package element-plus" 错误
optimizeDeps: {
include: [
'element-plus',
'@element-plus/icons-vue',
'vue',
'vue-router',
'pinia',
'axios'
]
},
server: {
host: '0.0.0.0',
port: 3000,
+2 -2
View File
@@ -138,8 +138,8 @@ start_frontend() {
cd $FRONTEND_DIR
# 检查 node_modules
if [ ! -d "node_modules" ]; then
# 检查 node_modules 及关键依赖是否完整
if [ ! -d "node_modules" ] || [ ! -f "node_modules/element-plus/es/index.mjs" ]; then
echo -e "${YELLOW}安装前端依赖...${NC}"
npm install
fi