import script --> .esm

Matthew Robb matthewwrobb at gmail.com
Wed Sep 10 09:46:26 PDT 2014


Alternatively you could argue that some of the hooks in Loader shouldn't be
in the language spec because they should likely exist outside of something
that is hyper-specifically a module loader. So if the web has a resource
loader construct similar to ES6 Loader and it would handle resolving paths
and it would handle fetching etc then the ES6 Loader needs to be concerned
with much less.

If `.js` is not in any ES spec then why was there ever the idea of auto
appending it to modules? I feel like this whole region of concerns is a bit
mixed up right now.


- Matthew Robb

On Wed, Sep 10, 2014 at 12:39 PM, Axel Rauschmayer <axel at rauschma.de> wrote:

> Modules and scripts can not always be identified by inspection.  Consider:
>
> foo.js -------------------------------
> const answer = 42;
> ---------------------------------------
>
> The semantics of this are quite different depending upon whether foo.js is
> evaluated as a script or loaded as a module.
>
>
> Given that module files and script files have different semantics, I would
> definitely want different file endings for them – for both humans and
> machines. 1JS doesn’t apply here.
>
> Axel
>
> --
> Dr. Axel Rauschmayer
> axel at rauschma.de
> rauschma.de
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140910/a9e2c4db/attachment.html>


More information about the es-discuss mailing list