Import wildcards on the right side of the statement
alicancubukcuoglu at gmail.com
Thu Apr 21 16:38:29 UTC 2016
I think `import` should be as dumb as possible and you should look for
another way to do this and it is probably [WHATWG Loader](
Another problem is that you are supposed to point to a single module when
you `import` and you point to multiple modules when you glob. How do these
multiple modules get merged into one?
If making an "index.js" for your "features" directory is such a trouble,
then investigate the WHATWG Loader spec to see if it allows you to:
1- Intercept an import and get its path.
2- If the path contains a glob, load multiple modules and merge them.
3- Provide the merged module as the result of the import.
Of course, you still won't be able to glob in a browser. For that, you can
glob when you build your app and ship it with the results.
To be honest, just keep an index manually.
Here is another [example](
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss