import type { APIServerStartInput } from '@modern-js/server-plugin' ; import { mergeExtension } from '../../utils' ; import { ModernRouteInterface } from '../../libs/route' ; import { ApiServerMode } from '../../constants' ; import { ModernDevServer } from './dev-server' ; export class ModernSSRDevServer extends ModernDevServer { protected prepareAPIHandler ( _m , _ ) { return null as any ; } protected async prepareWebHandler ( extension ) { return super . prepareWebHandler ( extension ) ; } protected filterRoutes ( routes ) { return routes . filter ( route => route . entryName ) ; } } export class ModernAPIDevServer extends ModernDevServer { protected async prepareAPIHandler ( mode , extension ) { return super . prepareAPIHandler ( mode , extension ) ; } protected filterRoutes ( routes ) { return routes . filter ( route => route . isApi ) ; } protected async preServerInit ( ) { } }