Closed edrex closed 10 years ago
This use-case seems a bit too specific to bake into factor-bundle itself since what people consider "external dependencies" is going to vary a lot, but I'm open to having a generalized way of providing a bundle policy to decide which files should go into the common bundle. A good place to implement this policy logic would be the opts.threshold
, which is currently just a number. If factor-bundle could take an opts.threshold
that was a function, it would be easy to implement these kinds of custom factoring policies.
I like it. The change you describe would enable the use case I described above, among others. I am willing to take a crack at a PR if you're not already working on it.
closing since the now-documented opts.threshold(row)
covers this use-case
Use case: Rapidly iterating on a deployed app, the app developer would like to avoid re-sending exernal dependencies on each app code change, since bundles are often multiple megabytes.
Flag would allow developers to use factor bundle in a single or multi entry-point configuration to automatically externalize absolute requires into common.js.
This feature seems in line with factor-bundle's other uses.