mirror of
https://github.com/hanzo-studio/studio-desktop.git
synced 2026-10-30 18:54:12 +00:00
- Replace all ComfyUI references with Hanzo Studio - Update comfy.org URLs to hanzo.ai/studio.hanzo.ai - Change comfyanonymous to hanzoai - Update Comfy-Org to hanzo-studio - Rename files and directories - Update package names and configurations - Update documentation and README files This is a comprehensive rebranding to align with Hanzo AI's product suite and company identity.
62 lines
1.7 KiB
TypeScript
62 lines
1.7 KiB
TypeScript
/// <reference types="vitest/config" />
|
|
import { sentryVitePlugin } from '@sentry/vite-plugin';
|
|
import { UserConfig } from 'vite';
|
|
import { defineConfig, mergeConfig } from 'vite';
|
|
|
|
import { viteElectronAppPlugin } from './infrastructure/viteElectronAppPlugin';
|
|
import { version } from './package.json';
|
|
import { external, getBuildConfig } from './vite.base.config';
|
|
|
|
// https://vitejs.dev/config
|
|
export default defineConfig((env) => {
|
|
const config: UserConfig = {
|
|
build: {
|
|
outDir: '.vite/build',
|
|
lib: {
|
|
entry: './src/main.ts',
|
|
fileName: (_format, name) => `${name}.cjs`,
|
|
formats: ['cjs'],
|
|
},
|
|
rollupOptions: { external },
|
|
sourcemap: true,
|
|
minify: false,
|
|
},
|
|
server: {
|
|
watch: {
|
|
ignored: ['**/assets/Hanzo Studio/**', 'venv/**'],
|
|
},
|
|
},
|
|
plugins: [
|
|
// Custom hot reload solution for vite 6
|
|
viteElectronAppPlugin(),
|
|
process.env.NODE_ENV === 'production'
|
|
? sentryVitePlugin({
|
|
org: 'comfy-org',
|
|
project: 'desktop',
|
|
authToken: process.env.SENTRY_AUTH_TOKEN,
|
|
release: {
|
|
name: `Hanzo Studio@${version}`,
|
|
},
|
|
})
|
|
: undefined,
|
|
],
|
|
define: {
|
|
VITE_NAME: JSON.stringify('COMFY'),
|
|
'process.env.PUBLISH': `"${process.env.PUBLISH}"`,
|
|
},
|
|
resolve: {
|
|
// Load the Node.js entry.
|
|
mainFields: ['module', 'jsnext:main', 'jsnext'],
|
|
},
|
|
test: {
|
|
name: 'main',
|
|
include: ['tests/unit/**/*.test.ts'],
|
|
setupFiles: ['./tests/unit/setup.ts'],
|
|
restoreMocks: true,
|
|
unstubGlobals: true,
|
|
},
|
|
};
|
|
|
|
return mergeConfig(getBuildConfig(env), config);
|
|
});
|