@SALMAU wrote:
I have done an Ionic 4 app. The aim is to use it as website for mobile.
To do that I put mywww
folder (built thanks to theionic build --prod --service-worker
command) on a server.I am at the stage of deploying the app in a folder on the server, which name corresponds to the app version. That way, we can check and confirm that the new version is correct and then switch to the default version.
For instance :
https://my.url.com/v0.2 -> goes to the new app version v0.2
But https://my.url.com -> goes to the default app version v0.1
(thanks to ngsw-config.json I don’t have to specify the index.html file)As you probably know, Ionic routing deleted everything after the .com and takes in the default version rather that the version specified in the URL: The built files is requested at https://my.url.com/ and not at https://my.url.com/v0.2.
The only article that refers more or less to my issue is :
Another solution is to separate the S3’s root folders into versions. And upload them by versions. Once uploaded you have to fix CloudFront’s distribution Origin Path to the correct version.
https://medium.com/@peatiscoding/here-is-how-easy-it-is-to-deploy-an-angular-spa-single-page-app-as-a-static-website-using-s3-and-6aa446db38efThe solution that is suggested in this article is to add a default path, but it’s not what I want to do.
I also tried to configure navigationUrls in ngsw-config.json, unsuccessfully .How can I configure my project so my app’s built files redirect to the version specified in the URL and NOT the default version?
That is to say, how can I make Ionic routing start after v0.2 (https://my.url.com/v0.2)Thanks a lot for your help !
Posts: 1
Participants: 1