-
-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bundle arithmetic - commonality and grouping #133
Comments
Is there still help on this one needed? Or is it already WIP? |
Contributions would be very welcome - any issues marked as contributions welcome are not otherwise being worked on. Just let me know if you want to give it a go and if you need any guidance at all. |
Yeah, any guidance would be very helpful – at least where to start as the syntax is new to me (the brackets, the dash and the *asterisk operator). Until now I just had a few thoughts about the bundling of core and specific bundles. Bear with me, I am just few days into jspm but I already love it (hopefully 6to5 default lands soon, I know you are on it ;)) but I am keen to contribute or at least give it a go. |
@interactionist yes perhaps we could consider API variations rather like:
Outputting bundle-home.js, bundle-feature1.js, bundle-feature2.js, bundle-shared.js or something like that? Or even something like:
Let me know what you think. |
Yeah. That sounds sensible. We could even go a step further and mark dependencies as shared/core dependencies on install:
One will likely know if a dependency (like jquery or underscore) is being used throughout the application and thus installing it as such from beginning as a common/shared bundle. And if you export your features like:
it should auto-generate the desired feature-bundels + the bundle-common.js |
@interactionist not sure about that - shared dependencies can be derived find for two-layer bundling. It's only for three-layer bundling that there is an optimization problem constraint. There is also the possibility to trace dynamic What I would suggest is that we create this API in SystemJS builder and then expose in jspm like the above. I've created systemjs/builder#51. |
Moved to systemjs/builder#113. |
The idea is to use
*
to indicate the shared dependencies operator.This way I can do:
To create a core bundle containing the common code that is shared throughout the application.
Then we can do:
To create a bundle for each feature, without the common code.
To summarize implementation needs:
*
operator.The text was updated successfully, but these errors were encountered: