-
Notifications
You must be signed in to change notification settings - Fork 122
bundle plugin hook is not called when module is rolled up in a build #517
Comments
Could you share what sorts of optimizations you would like to be making here? |
This is definitely a bug and should be supported. Implementation notes below. The native solution is to add an Perhaps we just need to split this into the two cases (i) where the inline records are manually run through the bundle hook for whole-tree optimization (abstracting the bundle hook into a unified shared method) and (ii) where the inline records need to be shared with a larger tree, accepting an existing list of "bundleLoads" into compileTree even when that might not intersect with the tree at all. This should also include assetList actually. |
sorry for not getting back to you on use cases... One example I had thought up was including a dependency like jquery normally in a bundle (for fast dev loading), but then for builds you'd instead return |
Released in 0.15.24. |
I'm not sure if this is by design or simply just unsupported with rollup, but I'd like to be able to run some steps in this hook.
alternatively, provide a means of getting
compileOpts
into the other hooks, so I can, for example, determine whether I'm making a static build/bundle, build for node/browser, and probably more things.can you do this? or would you not want to do that as it doesn't follow the spec?
The text was updated successfully, but these errors were encountered: