init
This commit is contained in:
commit
d69342b2e9
160 changed files with 28681 additions and 0 deletions
47
studio/vite.config.ts
Normal file
47
studio/vite.config.ts
Normal 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',
|
||||
],
|
||||
},
|
||||
},
|
||||
}),
|
||||
}))
|
||||
Loading…
Add table
Add a link
Reference in a new issue