Mapping files/dirs to ES6 modules, has a convention been reached on indexes? e.g. foo/index.js for internal relative imports
-
-
Replying to @_jayphelps
@_jayphelps if you figure that out let me know... esperanto.js allows './foo' to mean './foo/index', but I don't know if that's correct1 reply 0 retweets 1 like -
Replying to @Rich_Harris
@Rich_Harris But it won't transpile 'foo/index' to just 'foo', right? Which I feel like what is needed for AMD interop1 reply 0 retweets 0 likes -
Replying to @_jayphelps
@Rich_Harris Cc/@sebmck thoughts? Possible in babel some how? not just inter resolving, but e.g. AMD output 'foo/index' to just 'foo'1 reply 0 retweets 0 likes -
Replying to @_jayphelps
@_jayphelps There's the `resolveModuleSource` option that you can use to preprocess module sources. http://babeljs.io/docs/usage/options/ …@rich_harris1 reply 0 retweets 0 likes -
Replying to @sebmck
@sebmck@Rich_Harris Right but I thought that is only inner resolving. e.g. it won't transform your main entry point of 'foo/index' to 'foo'1 reply 0 retweets 0 likes -
Replying to @_jayphelps
@sebmck@Rich_Harris in the actual AMD output, for consumers who don't know/respect the index.js convention2 replies 0 retweets 0 likes
@_jayphelps You can return whatever you want in that function and it will effect the module source output. @rich_harris
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 