minify icon indicating copy to clipboard operation
minify copied to clipboard

concat with filter

Open diginote opened this issue 3 years ago • 1 comments

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.

diginote avatar Sep 12 '22 17:09 diginote

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...

tdewolff avatar Sep 13 '22 15:09 tdewolff