mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-18 11:44:05 +08:00
Adds a new function `isMainModule` that checks if the current module is the main entry point of the application. This is useful to ensure that server listener handlers are only registered when the module is executed directly and not when it's imported as a dependency such as the dev-server. This prevents potential issues with multiple listeners being registered unintentionally.
20 lines
566 B
TypeScript
20 lines
566 B
TypeScript
/**
|
|
* @license
|
|
* Copyright Google LLC All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.dev/license
|
|
*/
|
|
|
|
export {
|
|
CommonEngine,
|
|
type CommonEngineRenderOptions,
|
|
type CommonEngineOptions,
|
|
} from './src/common-engine/common-engine';
|
|
|
|
export { AngularNodeAppEngine } from './src/app-engine';
|
|
|
|
export { writeResponseToNodeResponse } from './src/response';
|
|
export { createWebRequestFromNodeRequest } from './src/request';
|
|
export { isMainModule } from './src/module';
|