It is syntactically valid, but there is no specification for what the module specifier string should contain. Traceur has one rule, and if you’re using Traceur you need to follow Traceur’s rules. I’m sure other transpilers have their own chosen rules.
In a hypothetical future where browsers have a module loader, they will have their own rule. Similarly, io.js will have its own. From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Mark Volkmann Sent: Sunday, May 31, 2015 17:21 To: es-discuss@mozilla.org Subject: import ModuleSpecifier I was under the impression that the following is a valid import statement: import {something} from './somefile'; I know this used to work in Traceur. However, in the latest version of Traceur I have to include a file extension like this for it to work: import {something} from './somefile.js'; I don't see any place in the spec. where it describes whether ModuleSpecifier should include a file extension. Maybe I just missed it. Is Traceur correct to require it? -- R. Mark Volkmann Object Computing, Inc.
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss