From 24b9b244b749609aea96aecf9874ddaae879367b Mon Sep 17 00:00:00 2001 From: root Date: Mon, 14 Sep 2026 15:39:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E6=9E=84=E5=BB=BA=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=B9=B6=E6=96=B0=E5=A2=9E=20.gitignore=EF=BC=9A=E7=BA=BF?= =?UTF-8?q?=E4=B8=8A=E4=BE=9D=E8=B5=96=E7=9A=84=20base=20=E4=B8=8E?= =?UTF-8?q?=E5=9B=BA=E5=AE=9A=E4=BA=A7=E7=89=A9=E5=90=8D=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit vite.config.js:加 base:'/asserts/index/'、assetsDir:''、固定产物名 (entryFileNames:'index.js' 等)。当前线上 /var/www/lionwebsite/asserts/index/ 的 index.js/index.css/index.html 均依赖此配置才能构建出来——属线上在用 但未入库的配置,不提交会导致 clone 后构建产物路径与线上不一致; index.html:favicon 改为 /asserts/favicon.ico(与线上入口一致); llm_readme.md:补文件末尾换行; 新增 .gitignore(npm 模板 + run.out):忽略 node_modules、dist、日志与编辑器文件。 --- .gitignore | 29 +++++++++++++++++++++++++++++ index.html | 2 +- llm_readme.md | 2 +- vite.config.js | 13 +++++++++++++ 4 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..96b71d8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,29 @@ +# Logs +logs +*.log +run.out +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +.DS_Store +dist +dist-ssr +coverage +*.local + +/cypress/videos/ +/cypress/screenshots/ + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/index.html b/index.html index d05b8c6..37781d1 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - + LionWebsite diff --git a/llm_readme.md b/llm_readme.md index 9ff6e95..a795b40 100644 --- a/llm_readme.md +++ b/llm_readme.md @@ -198,4 +198,4 @@ npm run preview # 预览构建产物 2. `state.websocket` 在 Vuex 中初始化为 `{}` 而非 `null`,检查方式不够严谨 3. `getShortname` 函数逻辑复杂且有多处副作用,可读性较低 4. 部分错误处理较简略(如 `queryGalleries` 中无网络错误处理) -5. `store/index.js` 中 action 使用全局 `state` 变量(而非 `context.state`),可能导致作用域混淆 \ No newline at end of file +5. `store/index.js` 中 action 使用全局 `state` 变量(而非 `context.state`),可能导致作用域混淆 diff --git a/vite.config.js b/vite.config.js index 7a889c8..e340313 100644 --- a/vite.config.js +++ b/vite.config.js @@ -2,8 +2,21 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' export default defineConfig({ + // Nginx 从 /asserts/index/ 提供桌面端静态文件;部署文件名保持固定, + // 以便根页面和现有静态路由无需随每次构建改名。 + base: '/asserts/index/', + assetsDir: '', plugins: [vue()], server:{ host: '0.0.0.0' + }, + build: { + rollupOptions: { + output: { + entryFileNames: 'index.js', + chunkFileNames: '[name].js', + assetFileNames: '[name][extname]' + } + } } })