Which js file load cordova-capacitor mobile app

Add the following to the bottom of the first Javascript file that loads with your app. This is <project-dir>/www/js/index.js for most Cordova projects.

I am trying to enable push notification via onesignal, i have installed the plugin, but i need to know where to add the script they provide.

I can only see routes.js file in the js folder. Is this the file that loads with the app?

We no longer have a default js file needed.

So you can pick and include any js file you want.

Is it ok if i paste the script in the route.js file?

No it is not ok as route.js is generated fully automatic and will be replaced.

Just use you own js file and include it.