Closed cryptiklemur closed 7 years ago
Damn, i thought i was on another branch. I also added something to allow passing custom context to evalBundleCode. Handy for the new react-router: https://reacttraining.com/react-router/web/guides/server-rendering/putting-it-all-together
Man, coveralls is spammy haha. Fixed all the tests
However, idk if this is too "hardcoded"... Your existing code only allows for a single entry point, this would just get the first file of the first entry point.
Allowing just a single entry point is fine for the purpose, but it must be the last file of the first entry point. Having multiple scripts per entry point is common usage.
Ok, changed it up. Will grab the last file
that ends with .js
This logic could be updated to loop through the chunks fairly easily, but idk what needs to happen after that. Does it just need to call the callback on each chunk? Can leave that for another PR
Any comments @gajus or requests?
Fixes #18
However, idk if this is too "hardcoded"... Your existing code only allows for a single entry point, this would just get the first file of the first entry point.