Ionic 4: PWA display app version from config.xml

Hi,

Is there any way to display Ionic 4 app version when deployed to PWA?

Currently, for iOS and Android I do it via

@ionic-native/app-version/ngx

Is there any standard straight-forward way to display version number on PWA from config.xml?

Thank you.

I created an npm module that adds a buildInfo.ts file to your Ionic project - you can then import that file and get build number and build date. You can find the module here: https://www.npmjs.com/package/ionic-build-info

1 Like

Nice

I once did this as npm package:
"deploy": "time /T > src\\assets\\time.txt && ionic build --prod"

And then this.http.get('assets/time.txt', { responseType: 'text' }) the result

Not as clean as yours…

thx for sharing