Dynamic, conditional imports with ES Modules
ES Modules let you import other JavaScript natively. A plain import statement is always going to run — but there is a pattern for doing it conditionally.
The idea is any sort of condition: checking the URL to load certain things only on certain pages, or loading particular web components in certain conditions. Responsible, conditional loading is another use case — for example, loading a module only if saveData isn't on.



