File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
apps/cli/src/helpers/core Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ function getFrontendType(frontend: Frontend[]): {
4747function getApiDependencies (
4848 api : string ,
4949 frontendType : ReturnType < typeof getFrontendType > ,
50+ backend : string ,
5051) {
5152 const deps : Record <
5253 string ,
@@ -66,6 +67,18 @@ function getApiDependencies(
6667 deps . server = { dependencies : [ "@trpc/server" , "@trpc/client" ] } ;
6768 }
6869
70+ if ( backend !== "self" && backend !== "convex" && backend !== "none" ) {
71+ if ( ! deps . server ) {
72+ deps . server = { dependencies : [ ] } ;
73+ }
74+
75+ if ( backend === "hono" ) {
76+ deps . server . dependencies . push ( "hono" ) ;
77+ } else if ( backend === "elysia" ) {
78+ deps . server . dependencies . push ( "elysia" ) ;
79+ }
80+ }
81+
6982 if ( frontendType . hasReactWeb ) {
7083 if ( api === "orpc" ) {
7184 deps . web = {
@@ -216,7 +229,7 @@ export async function setupApi(config: ProjectConfig) {
216229 const frontendType = getFrontendType ( frontend ) ;
217230
218231 if ( ! isConvex && api !== "none" ) {
219- const apiDeps = getApiDependencies ( api , frontendType ) ;
232+ const apiDeps = getApiDependencies ( api , frontendType , backend ) ;
220233 const apiPackageDir = path . join ( projectDir , "packages/api" ) ;
221234
222235 if ( apiDeps . server ) {
You can’t perform that action at this time.
0 commit comments