How to test non-ESM <script nomodule> on a modern setup?

27 views Asked by At

I am developing a website which is supposed to support old browsers (namely Chrome 49 on Windows XP), and thus provides two sets of scripts: <script type="module" src="..."> for modern browsers and <script nomodule src="..."> for legacy browsers.

The question is, how can I actually test the legacy build (on a M1 Mac)? There used to be dom.moduleScripts.enabled in Firefox, but it's long gone. Firefox 65 and Chrome 62 (the two latest versions that didn't support ESM based on caniuse) crash on M1. I ended up using Chrome 49 in a UTM virtual machine running Windows XP, which is inconveniently slow. Is there some simpler way? I don't really care for the actual ES6/ES7 feature set, I just want the browser to use nomodule scripts and ignore type="module" ones.

0

There are 0 answers