guybedford / es-module-shims

Shims for new ES modules features on top of the basic modules support in browsers
MIT License
1.52k stars 83 forks source link

Polyfill not firing, how to debug ? (ios v14-15 ) #402

Open allan-simon opened 10 months ago

allan-simon commented 10 months ago

I'm testing in browserstack.com with an iphone ios on safari (v14 and v15 , same result)

with the following html (simplified, if i'm missing some import bits for you please tell me)

<head>
<script async="" src="https://assets-testenv.rosaly.info/assets/vendor/es-module-shims-cfbc0e43f4befa7f47971772b7fb8a39.js"></script>
<script type="importmap">
{
    "imports": {
        "payment_selection_fake_loader": "https://assets-testenv.rosaly.info/assets/js/end_users/payment_selection_fake_loader-189a1a454bb0a1fa318ad84b96c4a0c1.js",
        "company_admin_dashboard": "https://assets-testenv.rosaly.info/assets/company_admin_dashboard-b1ef2f3239b41a72a0da46d62784a9a8.js",
        "rosaly_apexcharts": "https://assets-testenv.rosaly.info/assets/apexcharts-ff6cf1a5f0409f64968ce0766ac7ec05.js",
        "rosaly_autocompleter": "https://assets-testenv.rosaly.info/assets/autocompleter-be00fcccc1f429fabfaf15dd6ce95257.js",
        "rosaly_roundslider": "https://assets-testenv.rosaly.info/assets/roundslider-7e19c2396691656c9450bf17a1183e40.js",
        "autocompleter": "https://assets-testenv.rosaly.info/assets/vendor/autocompleter-30752d91d9dc33baec3da5df576f71d5.js",
        "apexcharts": "https://assets-testenv.rosaly.info/assets/vendor/apexcharts-d0e6c376e498b8f951ae103490ec20b9.js",
        "round-slider": "https://assets-testenv.rosaly.info/assets/vendor/round-slider-2ad4285728d34d120f752eaff96f43b1.js",
        "jquery": "https://assets-testenv.rosaly.info/assets/vendor/jquery-fb3b33d7311be80ac8aa5c367205beba.js",
        "intro.js": "https://assets-testenv.rosaly.info/assets/vendor/intro.js-66737318a9f5106333c48a86c55ea4e5.js",
        "dialog-polyfill": "https://assets-testenv.rosaly.info/assets/vendor/dialog-polyfill-f736a8bd83f0a9f4766e748fc024e967.js"
    }
}
</script>
</head>
<body>
<script type="module">
    import 'rosaly_roundslider';
</script>
</body>

I can see in the debug

TypeError: Module specifier, 'rosaly_roundslider' does not start with "/", "./", or "../". Referenced 

My understanding is that I should also see

^^ Module TypeError above is polyfilled and can be ignored ^^

Is it related to #363 ? How can I debug this ? Thanks for your help

guybedford commented 10 months ago

Does your testing environment give both normal console logs and errors or only errors?

The previous bugs with polyfill engaging on iOS were resolved in the latest versions, so this should no longer be an issue.

allan-simon commented 10 months ago

i will test again to be sure. In the meantime i've seen than on other plateform due to our strict CSP policy, we have an error that block the blob: URL (but a they work anyway without the need of the shim I've ignored that)