Skip to content
Merged
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
14 changes: 11 additions & 3 deletions apps/server/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@ import { defineConfig, mergeConfig } from "vite-plus";

import baseConfig from "../../vite.config.ts";

const internalPackagePrefixes = ["@t3tools/", "effect-acp", "effect-codex-app-server"];
const bundledPackagePrefixes = [
"@pierre/diffs",
"@t3tools/",
"effect-acp",
"effect-codex-app-server",
];

export function shouldBundleCliDependency(id: string): boolean {
return bundledPackagePrefixes.some((prefix) => id.startsWith(prefix));
}

export default mergeConfig(
baseConfig,
Expand All @@ -23,8 +32,7 @@ export default mergeConfig(
sourcemap: true,
clean: true,
deps: {
alwaysBundle: (id: string) =>
internalPackagePrefixes.some((prefix) => id.startsWith(prefix)),
alwaysBundle: shouldBundleCliDependency,
onlyBundle: false,
},
banner: {
Expand Down
Loading