es-module-shims icon indicating copy to clipboard operation
es-module-shims copied to clipboard

Hit & miss loading of modules using 1.7.1

Open tomgreenhill opened this issue 1 year ago • 3 comments

Hey Guy,

Thanks for your previous assistance!

I'm having issues with modules loading intermittently between refreshes. I'm unsure what's causing it as I receive the following log message:

[Log] ^^ Module TypeError above is polyfilled and can be ignored ^^ (es-module-shims.js, line 1)

Screenshot 2023-04-05 at 13 53 42

But then sometimes the modules on the page don't load. Am using 1.7.1 and can provide a preview link if required. Happy to assist debugging wherever possible.

Thanks.

tomgreenhill avatar Apr 05 '23 12:04 tomgreenhill

Hey @tomgreenhill sure we can look into this, it sounds like it might be something around the load events to me, as opposed to the polyfill engaging this time.

Can you run the the debug build of es-module-shims (https://unpkg.com/browse/[email protected]/dist/es-module-shims.debug.js), and share the log output / the difference in logging between a successful and unsuccessful run?

Another thing to try is if the noLoadEventRetriggers helps or hinders - https://github.com/guybedford/es-module-shims#no-load-event-retriggers.

guybedford avatar Apr 06 '23 04:04 guybedford

I think I might have a fix at #369, would appreciate some 👀 when you have the chance. 🙏

lewisl9029 avatar Apr 21 '23 00:04 lewisl9029

So sorry I haven't tested this yet. I've been moving so all over the place. Will try and put some time aside in the next week or so to look over this again. Thanks for the update!

tomgreenhill avatar Apr 25 '23 09:04 tomgreenhill