mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-01 03:31:58 +00:00
- Add comprehensive PrimeVue theme setup with ComfyUI preset - Configure proper Vue app setup with Pinia stores, i18n, and services - Remove unused onboarding addon from Storybook dependencies - Improve Vite configuration with better chunking and alias resolution - Add proper CSS imports and styling for ComfyUI components 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
54 lines
1.5 KiB
TypeScript
54 lines
1.5 KiB
TypeScript
import type { StorybookConfig } from '@storybook/vue3-vite'
|
|
import { type InlineConfig, mergeConfig } from 'vite'
|
|
import path from 'path'
|
|
import { fileURLToPath } from 'url'
|
|
|
|
const __filename = fileURLToPath(import.meta.url)
|
|
const __dirname = path.dirname(__filename)
|
|
|
|
const config: StorybookConfig = {
|
|
stories: ['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
|
addons: ['@storybook/addon-docs'],
|
|
framework: {
|
|
name: '@storybook/vue3-vite',
|
|
options: {}
|
|
},
|
|
async viteFinal(config) {
|
|
return mergeConfig(config, {
|
|
server: {
|
|
allowedHosts: true
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': __dirname + '/../src'
|
|
}
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
external: (id) => {
|
|
// Suppress warnings for unused Vue internal imports
|
|
return false
|
|
},
|
|
onwarn: (warning, warn) => {
|
|
// Suppress specific warnings
|
|
if (warning.code === 'UNUSED_EXTERNAL_IMPORT' && warning.message?.includes('resolveComponent')) {
|
|
return
|
|
}
|
|
warn(warning)
|
|
},
|
|
output: {
|
|
manualChunks: {
|
|
'vue-vendor': ['vue', 'vue-router'],
|
|
'primevue': ['primevue/config', 'primevue'],
|
|
'storybook-docs': ['@storybook/docs-tools'],
|
|
'litegraph': ['./src/lib/litegraph']
|
|
}
|
|
}
|
|
},
|
|
chunkSizeWarningLimit: 1000
|
|
}
|
|
} satisfies InlineConfig)
|
|
}
|
|
}
|
|
export default config
|