cramforce/splittable

Assertion error using nested dependencies

garthenweb opened this issue · 4 comments

When bundling files with nested dependencies splittable stops with AssertionError: Should be in at least 1 bundle c.js.

To demonstrate this issue I created a test repository.
When removing one level and importing c.js instead of b.js in a.js, splittable is working perfectly fine.

I guess this is related to the limitation documented the section "Possible improvements":

Splittable only supports one layer of bundle hierarchy. This can lead to an extremely bloated base bundle. Multiple layers could be supported at the price of greater complexity in several dimensions.

But I would not expect splittable to throw when using deeper nested dependencies.

Do I get something wrong here?

I have good and bad news.

Good news: This was a legit bug and I fixed it.
Bad news: The syntax you are using in in your example export * from './c'; is not currently supported by closure compiler.

Fixed in splittable@2.1.1. Will leave open because this needs a regression test.

Thank you for the quick response and the solution! splittable is now working for me even with a larger code base, sadly I now have to fight with Clousure Compiler (not only with the syntax mentioned above). But that is not part of this repository...

Thanks again!