Guy Bedford (2013-07-31T07:05:43.000Z)
I'm in the process of matching up an ES6 module loader with AMD support to
the RequireJS tests, and have a question on concatenated module files.

If I have a module, foo.js, which defines its own name and its dependencies:

foo.js:
module 'foo' {
  export var p = 'value';
}
module 'foo/dependency' {
  export var q = 'dep';
}

When loaded, will this ensure that the module value is defined from the
module statement taking precedence over the empty module implied by the
lack of exports?

These techniques are used extensively for builds in RequireJS, which I
think would be very useful in ES6 modules and for the AMD polyfill path.

Clarification would be appreciated to know if I'm correct in including this.

Guy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130731/25f54a6c/attachment.html>
domenic at domenicdenicola.com (2013-08-02T21:02:12.565Z)
I'm in the process of matching up an ES6 module loader with AMD support to
the RequireJS tests, and have a question on concatenated module files.

If I have a module, foo.js, which defines its own name and its dependencies:

foo.js:
```js
module 'foo' {
  export var p = 'value';
}
module 'foo/dependency' {
  export var q = 'dep';
}
```

When loaded, will this ensure that the module value is defined from the
module statement taking precedence over the empty module implied by the
lack of exports?

These techniques are used extensively for builds in RequireJS, which I
think would be very useful in ES6 modules and for the AMD polyfill path.

Clarification would be appreciated to know if I'm correct in including this.