fix(frontend): include frontend/dist in npm package and support static file serving

- Add ccw/frontend/dist/ to package.json files field
- Modify react-frontend.ts to detect and use production build
- Add static file serving to server.ts with MIME type support
- Update prepublishOnly to build frontend before publishing
- Fix unused import in TerminalDashboardPage.tsx

This fixes the 'Could not find React frontend directory' error when users install from npm.
This commit is contained in:
catlog22
2026-02-28 08:39:07 +08:00
parent 54f15b6bda
commit 902ee8528a
5 changed files with 129 additions and 538 deletions

View File

@@ -28,7 +28,6 @@ import { FileSidebarPanel } from '@/components/terminal-dashboard/FileSidebarPan
import { useWorkflowStore, selectProjectPath } from '@/stores/workflowStore';
import { useAppStore, selectIsImmersiveMode } from '@/stores/appStore';
import { useConfigStore } from '@/stores/configStore';
import { useQueueSchedulerStore } from '@/stores/queueSchedulerStore';
// ========== Main Page Component ==========