refactor: move studio to frontends workspace

- Move studio from root to frontends/studio/
- Add owner-tools frontend for live blog admin UI
- Add shared ui component library
- Set up npm workspaces for frontends
- Add enhanced code block extension for editor

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Josh 2026-01-12 01:59:56 +02:00
parent c662e41b97
commit bef5dd4437
108 changed files with 8650 additions and 441 deletions

View file

@ -0,0 +1,47 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import UnoCSS from 'unocss/vite'
export default defineConfig(({ command }) => ({
plugins: [UnoCSS(), react()],
base: '/studio',
build: {
outDir: 'dist',
},
optimizeDeps: {
include: [
// Pre-bundle heavy Tiptap dependencies
'@tiptap/react',
'@tiptap/starter-kit',
'@tiptap/extension-link',
'@tiptap/extension-image',
'@tiptap/extension-placeholder',
'@tiptap/extension-table',
'@tiptap/extension-task-list',
'@tiptap/extension-task-item',
'@tiptap/extension-code-block-lowlight',
'@tiptap/markdown',
'lowlight',
// Monaco editor
'@monaco-editor/react',
],
},
...(command === 'serve' && {
server: {
host: true,
strictPort: true,
allowedHosts: true,
hmr: {
clientPort: 80,
path: '/studio',
},
warmup: {
clientFiles: [
'./src/components/editor/PostEditor.tsx',
'./src/components/editor/SourceEditor.tsx',
'./src/pages/PostEditorPage.tsx',
],
},
},
}),
}))