From e9d435aeb1e8c194feb0bdb961d23f84270c1c5b Mon Sep 17 00:00:00 2001 From: huchenlei Date: Wed, 13 Nov 2024 14:18:52 -0500 Subject: [PATCH] Disable minify on main build --- src/main.ts | 1 + vite.main.config.ts | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.ts b/src/main.ts index f16868ce..5b42d664 100644 --- a/src/main.ts +++ b/src/main.ts @@ -554,6 +554,7 @@ function findAvailablePort(startPort: number, endPort: number): Promise */ function isFirstTimeSetup(): boolean { const extraModelsConfigPath = getModelConfigPath(); + log.info(`Checking if first time setup is complete. Extra models config path: ${extraModelsConfigPath}`); return !fs.existsSync(extraModelsConfigPath); } diff --git a/vite.main.config.ts b/vite.main.config.ts index 34037617..c7bd950a 100644 --- a/vite.main.config.ts +++ b/vite.main.config.ts @@ -1,15 +1,13 @@ import type { ConfigEnv, UserConfig } from 'vite'; import { defineConfig, mergeConfig } from 'vite'; -import { getBuildConfig, getBuildDefine, external, pluginHotRestart } from './vite.base.config'; +import { getBuildConfig, external, pluginHotRestart } from './vite.base.config'; import { sentryVitePlugin } from '@sentry/vite-plugin'; import { version } from './package.json'; -import { resolve } from 'node:path'; // https://vitejs.dev/config export default defineConfig((env) => { - const forgeEnv = env as ConfigEnv<'build'>; - const { forgeConfigSelf } = forgeEnv; - //const define = getBuildDefine(forgeEnv); + const forgeEnv = env as ConfigEnv; + const config: UserConfig = { build: { outDir: '.vite/build', @@ -22,6 +20,7 @@ export default defineConfig((env) => { external, }, sourcemap: true, + minify: false, }, plugins: [ pluginHotRestart('restart'),