Javascript in WebView works when debugged in production mode, but not when published on Expo.

I have a WebView with a leaflet.js map in it. I need it to show a map offline so instead of the normal leaflet.js I’m using leaflet-offline

It works as it should when debugging in production mode, but when published in the expo app the map doesn’t show, just the text in the html that should be behind the map.

Any idea for what I should try?

from leaflet-offline.js

'use strict';

(function (factory) {
    if (typeof define === 'function' && define.amd) {
        define(['./TileLayer.Offline', './Control.Offline'], factory);
    } else if (typeof exports === 'object' && module.exports) {
        module.exports = factory(require('./TileLayer.Offline'), require('./Control.Offline'));
}(function (TileLayerOffline, ControlOffline) {

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.