Closed laggingreflex closed 7 years ago
PS: It contains a lot of previous commits (#16, #18, #23). I can rebase if needed.
PS: It contains a lot of previous commits (#16, #18, #23). I can rebase if needed.
Yes, please.
But if the file doesn't contain any default exports, assuming it has only named exports, it uses * as when creating its index.
Similar to https://github.com/gajus/create-index/pull/18
This promotes bad design.
Creating an index file that imports * as foo
and requiring anything from that index will include all the files to the resulting bundle.
Uses Babylon parser to parse the file to check if it contains a default export.
If a file now contains a default export, the behaviour will be the same as before.
But if the file doesn't contain any default exports, assuming it has only named exports, it uses
* as
when creating its index.Eg. Default export: (same as before)
will create ine the index:
Eg. Named exports:
will create ine the index:
Builds on #18, addresses #11