Hi all,
I've been using Component for the last 9 months - I love the community around it and the basic idea is fantastic.
In that time I've only really had one issue: the current project I'm working on is a very large application that's using about 50 components (a combination of installed dependencies and local modules) and I realised that this was adding nearly 200kb of 'require.alias' calls to the build file. Because these are large strings I found that this was stubbornly refusing to minify well, too.
Our build size was 950k which minified to 455k (I know, it's crazy, don't ask).
I did do a search on this mailing list and on the Google+ community for anyone else with a problem with the all the require.alias data and didn't find anything. I couldn't find any options for Component build to avoid the aliases either. Perhaps it's pretty rare that people use Component as a package manager for such large applications?
It'd be nice if Component supported a simpler, smaller build output for projects not using the namespacing, but I'm not sure enough people are concerned with the file sizes to justify the effort.
To work around this myself I've made a quick tool to 'flatten' Component builds which uses the require.alias data to resolve modules as a post-build, pre-minification step instead of leaving it for the browser to do. This means it can discard the require.alias calls and truncate the names of modules to their canonical names, i.e., 'component-dom/index.js' just becomes 'dom'.
It can't be used for all Component builds - if you're using namespacing in any way at all - say 'component/underscore' and 'components/underscore' then it's not for you.
The result for our app was that the new minified size is 250k which is looking a little less embarrassing (considering it's got jQuery, Backbone and Underscore in it).
C
--