How to get ionic to work with mapbox gl js with local map files?


I’m trying to get mapbox gl js to work with local pbf files. I have an asset folder filled with .pbf’s and configured mapbox to get those files like this:

"tiles": [location.origin+location.pathname+"assets/gabon/{z}/{x}/{y}.pbf"],

This works great when I run ionic , but doesn’t work on IOS. Probably because it doesn’t resolve to an url on IOS. Any ideas on how to fix this?