concat with filter
Is it possible to extend the bundle functionality with a filter so that only functions with a special annotation (e.g. @bundle desktop or @bundle mobile) are bundled to a file. With that it would be possible to annotate functions which are related to desktop, mobile, ... and bundle them later to one file. This would enable one to create smaller bundles for different use cases but write related code in one file. For that you need to parse the content of the files which of course slow down the bundle time. However, the slower performance would buy some flexibility.
Thanks for the suggestion. Unfortunately the bundling feature of minify is fairly basic and limited (it concatenates files) and there is no roadmap to implement a more advanced bundler. I think your best bet is to put the special annotated functions in different files...