Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable minify on main build #238

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@ function findAvailablePort(startPort: number, endPort: number): Promise<number>
*/
function isFirstTimeSetup(): boolean {
const extraModelsConfigPath = getModelConfigPath();
log.info(`Checking if first time setup is complete. Extra models config path: ${extraModelsConfigPath}`);
return !fs.existsSync(extraModelsConfigPath);
}

Expand Down
9 changes: 4 additions & 5 deletions vite.main.config.ts
Original file line number Diff line number Diff line change
@@ -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;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these unused vars / imports.

//const define = getBuildDefine(forgeEnv);
const forgeEnv = env as ConfigEnv;

const config: UserConfig = {
build: {
outDir: '.vite/build',
Expand All @@ -22,6 +20,7 @@ export default defineConfig((env) => {
external,
},
sourcemap: true,
minify: false,
},
plugins: [
pluginHotRestart('restart'),
Expand Down
Loading