| ... | @@ -3,7 +3,16 @@ import { defineConfig, mergeConfig } from "vite-plus"; | ... | @@ -3,7 +3,16 @@ import { defineConfig, mergeConfig } from "vite-plus"; |
| 3 | | 3 | |
| 4 | import baseConfig from "../../vite.config.ts"; | 4 | import baseConfig from "../../vite.config.ts"; |
| 5 | | 5 | |
| 6 | const internalPackagePrefixes = ["@t3tools/", "effect-acp", "effect-codex-app-server"]; | 6 | const bundledPackagePrefixes = [ |
| | 7 | "@pierre/diffs", |
| | 8 | "@t3tools/", |
| | 9 | "effect-acp", |
| | 10 | "effect-codex-app-server", |
| | 11 | ]; |
| | 12 | |
| | 13 | export function shouldBundleCliDependency(id: string): boolean { |
| | 14 | return bundledPackagePrefixes.some((prefix) => id.startsWith(prefix)); |
| | 15 | } |
| 7 | | 16 | |
| 8 | export default mergeConfig( | 17 | export default mergeConfig( |
| 9 | baseConfig, | 18 | baseConfig, |
| ... | @@ -23,8 +32,7 @@ export default mergeConfig( | ... | @@ -23,8 +32,7 @@ export default mergeConfig( |
| 23 | sourcemap: true, | 32 | sourcemap: true, |
| 24 | clean: true, | 33 | clean: true, |
| 25 | deps: { | 34 | deps: { |
| 26 | alwaysBundle: (id: string) => | 35 | alwaysBundle: shouldBundleCliDependency, |
| 27 | internalPackagePrefixes.some((prefix) => id.startsWith(prefix)), | | |
| 28 | onlyBundle: false, | 36 | onlyBundle: false, |
| 29 | }, | 37 | }, |
| 30 | banner: { | 38 | banner: { |