-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Changing all directory import statements to explicitly import index.js #1991
Comments
MDC Web only intends to support the formats listed in importing-js.md. |
Bummer, I mean, the syntax is still ES2015. The issue is just that having /index.js be implicit isn't part of any standard loader spec that I know of. So a module loader that sticks strictly to a standard like whatwg loader can't support this... and this makes sense because it would be bad for a browser to make multiple calls to the server seeing if foo.js or foo/index.js existed. It wouldn't be a breaking change. I'd include tests in the PR. :) |
Ok...you've convinced us. :) However we still think that the Feel free to submit a pull request that:
|
Sweet! I'm fine with omitting the '.js' part. I've submitted #2111 for this issue. |
Hi, I love this project! Would you all consider accepting a PR that changed all directory import statements from
import './foo'
toimport './foo/index.js'
? I know node and webpack support the current style but other module loaders like systemjs don't. Thanks for considering this.The text was updated successfully, but these errors were encountered: