mirror of
https://github.com/lobehub/lobe-chat.git
synced 2026-06-14 03:30:19 +00:00
♻️ refactor: serve Vite SPA static assets under /_spa (#13409)
Made-with: Cursor
This commit is contained in:
@@ -2,7 +2,7 @@ import { cpSync, existsSync, mkdirSync } from 'node:fs';
|
||||
import path from 'node:path';
|
||||
|
||||
const root = path.resolve(import.meta.dirname, '..');
|
||||
const spaDir = path.resolve(root, 'public/spa');
|
||||
const spaDir = path.resolve(root, 'public/_spa');
|
||||
const distDirs = ['desktop', 'mobile'] as const;
|
||||
const copyDirs = ['assets', 'i18n', 'vendor'] as const;
|
||||
|
||||
@@ -16,6 +16,6 @@ for (const distDir of distDirs) {
|
||||
if (!existsSync(sourceDir)) continue;
|
||||
|
||||
cpSync(sourceDir, targetDir, { recursive: true });
|
||||
console.log(`Copied dist/${distDir}/${dir} -> public/spa/${dir}`);
|
||||
console.log(`Copied dist/${distDir}/${dir} -> public/_spa/${dir}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user