Tuesday, 26 November 2019

What is the relation between the whatwg's Loader spec, dynamic import proposal and

How are the three above related? This is my understanding so far: ES6 spec defines the syntax for ES6 modules, but it doesn't specify how to load those modules. The only way to use them in browser environment is through module scripts. There is also a dynamic import operator proposal that lets you conditionally load modules from scripts and module scripts. So, does the Loader spec say how the browser loads module scripts in the background? Or maybe it says how the import() operator behaves in different environments? Or it is something else and not related to the above two? If the Loader spec says how import() behaves in different environments, how that relates to the way browser loads modules used by <script type="module">? Are there two specs on how module loading works, based on whether it is by the dynamic import operator or <script type="module">?



from What is the relation between the whatwg's Loader spec, dynamic import proposal and

No comments:

Post a Comment