We have added support to the RequireJSFilter for being able to exclude files from other bundles (using the --exlude option to r.js). Would that be something you'd be interested in integrating it into webasset? If so I'll open a PR.
When building multi-page apps using RequireJS, it's useful to have core dependencies packed into one file, and per-page decencies into a separate files. Take e.g.:
This will ensure that r.js received the --exclude argument with a list of files from the excluded bundles, and that in above example jquery will not be packed into the page bundle.
We have added support to the RequireJSFilter for being able to exclude files from other bundles (using the
--exlude
option tor.js
). Would that be something you'd be interested in integrating it into webasset? If so I'll open a PR.When building multi-page apps using RequireJS, it's useful to have core dependencies packed into one file, and per-page decencies into a separate files. Take e.g.:
With the bundles:
What will happen currently is that
core.packed.js
contains all of jquery, howevergen/page.packed.js
also contains all of jQuery.We suggest adding an exclude option to
RequireJSFilter
so that you co do something like:This will ensure that r.js received the
--exclude
argument with a list of files from the excluded bundles, and that in above example jquery will not be packed into thepage
bundle.