From c2dbaaa4d1d5a5675b5812a7ed2317076ac414fe Mon Sep 17 00:00:00 2001 From: David Luecke Date: Tue, 14 Mar 2023 18:59:50 -0700 Subject: [PATCH] fix(generators): Conditionally import channels in Express app (#3106) --- packages/generators/src/app/templates/app.tpl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/generators/src/app/templates/app.tpl.ts b/packages/generators/src/app/templates/app.tpl.ts index 13a6135df1..4cfbdc462d 100644 --- a/packages/generators/src/app/templates/app.tpl.ts +++ b/packages/generators/src/app/templates/app.tpl.ts @@ -81,7 +81,7 @@ ${schema !== false ? `import { configurationValidator } from './configuration'` import { logger } from './logger' import { logError } from './hooks/log-error' import { services } from './services/index' -import { channels } from './channels' +${transports.includes('websockets') ? `import { channels } from './channels'` : ''} const app: Application = express(feathers())