I have an Angular SSR project set up to run my Express API as part of the SSR service. All my app code lives in /src/app, and all my API code lives in /src/api. There are some imports of my API code into the app code, but I've tried to limit this to just using the same type definitions that my backend uses (so there's stuff like import type {MyBackendResponse} from '../../../api/types/myBackend.ts'). When I run ng build in my app, it compiles, but with a bunch of warnings that look like: ▲ [Warning] Module 'express-session' used by 'src/api/index.ts' is not ESM CommonJS or AMD dependencies can cause optimization bailouts. For more information see: https://angular.io/guide/build#configuring-commonjs-dependencies I'm confident that none of these modules are being included in the browser code - I've searched all of the dist/<appname>/browser folder, and there's no mention of these libraries, while the server folder does. I'm currently ignoring these warnings, but I'd really like it if Angular actually scolded me about it if these were making their way into my browser code bundles. Am I actually goofing up my setup somehow, and these warnings are accurate? Or is there a way to make Angular not complain about these files? (Note: I do NOT want to just turn off the warnings for these packages - I want Angular to yell at me if these are included in the browser bundles! I just don't care if it's included in the server-side code.) Continue reading...