Ionic serve works not fully /Cordova.js not included

A testing of my app in browser is not possible. The first view of the app is showing but login for example is not possible because " Cordova.js is not included" . Each time I need to test the app I have to build it and test it on device. Why can’t I test the app in browser?

If you search on google you will find certain types of solutions to be able to run it in the browser, depending on the modules you use.

How i work? 2 options:
1)Use this condition before using the modules that throw the problem:
import {Platform } from ‘@ionic/angular’
Declare in constructor: private platform: Platform
if (‘cordova’)) {
this.fcm.unsuscribeTo //this example with the plugin import { FCM } from ‘@ionic-native/fcm/ngx’;

if the condition is met, u are using a real device or emulator not browser, if not u are working on browser so you can test the rest of ur application without that module.

  1. Use emulator as for example: ionic cordova emulate android --livereload
    With the parameter --livereload the changes are executed without reloading the application again