Offline Mbtiles map with Capacitor

I am building an application working offline with map from Open Map tiles. it is working with cordova and mapbox following this link : mapbox-gl-cordova-offline/ at master · oscarfonts/mapbox-gl-cordova-offline · GitHub

I want to use capacitor and have the same mbtiles map offline, can any one help me with the code to load the map.