Say I had 1 MB of compressed Javascript, all combined into one file using Google Closure.
Now 500 KB of it is only needed for one section of the site.
So I want to combine & compress the Javascript, but separate it into two packages:
- Package A - 500 KB - used across the site
- Package B - 500 KB - used only in one section of the site
At the moment I'm just putting a comment at the top of the Javascript files like this:
/// <package name="Main" />
And using my own custom .NET application to parse them and put them in the appropriate package.
Is it possible to do all of this with Google Closure? I'd rather use an existing solution than re-invent the wheel.