Ionic V4, how to inject build files to index.html manually

I need to migrate an ionic v3 app to ionic 4.
And we have some logic inside the index.html file, where we making request to the server first.
And if the user is not logined then we injecting the html form from the server, than logining, and than when everything is fine we injecting the build files into the index.html and booting the app.
But in the ionic v4 those build files are added automatically.
So my question is is there any way to prevent adding those files, and inject them manually?