this attribute is (only recently) supported by all major browsers and code like this will (imo) be very common in the future: <script type="module" src="module.js"></script> <script nomodule src="fallback.js"></script> or <script nomodule="nomodule" src="fallback.js"></script>