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:
parent
c662e41b97
commit
bef5dd4437
108 changed files with 8650 additions and 441 deletions
42
frontends/owner-tools/vite.config.ts
Normal file
42
frontends/owner-tools/vite.config.ts
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import UnoCSS from 'unocss/vite'
|
||||
import { resolve } from 'path'
|
||||
|
||||
export default defineConfig(({ command }) => ({
|
||||
plugins: [UnoCSS(), ...(command === 'build' ? [react()] : [])],
|
||||
base: command === 'serve' ? '/@owner-tools' : '/',
|
||||
esbuild: {
|
||||
jsxInject: `import React from 'react'`
|
||||
},
|
||||
|
||||
...(command === 'serve' && {
|
||||
server: {
|
||||
host: true,
|
||||
port: 5174,
|
||||
strictPort: true,
|
||||
allowedHosts: true,
|
||||
hmr: {
|
||||
clientPort: 80,
|
||||
path: '/@owner-tools'
|
||||
},
|
||||
proxy: {
|
||||
'/api/studio': {
|
||||
target: 'http://app:8080',
|
||||
changeOrigin: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}),
|
||||
|
||||
build: {
|
||||
lib: {
|
||||
entry: resolve(__dirname, 'src/main.tsx'),
|
||||
name: 'OwnerTools',
|
||||
formats: ['iife'],
|
||||
fileName: () => 'owner-tools.js'
|
||||
},
|
||||
outDir: '../../internal/build/assets/js',
|
||||
emptyOutDir: false
|
||||
}
|
||||
}))
|
||||
Loading…
Add table
Add a link
Reference in a new issue