On Friday, June 20, 2014 7:15 PM, Andrea Giammarchi
<[email protected]> wrote:
typo ...
```
var require = function (fromWhere) {
return import * from fromWhere
};
```
That's not valid ES6. It's specified that:
- Import and export statements can only be top level statements
- The module name must be a string literal.
- Import * is not specified.
ES6 modules are designed to be static. So no, you can't use import statements
under the hood in require(). But you can set up things so that you can use
"import" to import CommonJS modules.
Juan_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss