These are chat archives for brunch/brunch
Fast front-end web app build tool with simple declarative config, seamless incremental compilation for rapid development, an opinionated pipeline and workflow, and core support for source maps.
Hi @DoumanAsh Thanks for your time, and sorry for my delayed response - My goal is this:
I have a series of resources (page, comment, user, etc.) and for each resource, I’d like to create a separate bundle - page-bundle.js, comment-bundle.js and user-bundle.js. I want, in every page to include just ONE of these bundles. For example, on a user page (registration/login/etc) I will include just user-bundle.js. Each bundle should contain vendor.js (jQuery, UI framework’s JS, Vue/React, etc.) and the rest of the JS meant for that resource, in this case, the user-related JS.
entryPointsare supplement to
joinToi never used it at all. Maybe @shvaikalesh could help?
joinTobut it has its limitation - when included in an array, it doesn’t preserve the order inside the array. So, this means, your main code will load before
Vendor.jsand will lead to a slew of errors. So, currently my only work around is generate a separate
vendor.js, include it in every page in a separate script tag and load page-specific scripts after. That’s two http requests and that sucks, but yeah, not many options. \