Closed rodyhaddad closed 8 years ago
Would this take into account development versus production environments? I'm a fan of the grunt-usemin, rails, or sails methods of doing this.
/* build dist/app.js */
file1.js
file2.js
file3.js
file4.js
/* endbuild */
Development would load all of this and prevent the need for source maps. Production then could add another step to concat, minify, and sourcemap.
File concatenation is an HTTP/2 anti-pattern, see https://docs.google.com/presentation/d/1r7QXGYOLCh4fcUq0jDdDwKJWNqWK1o4xMtYpKZCJYjM/edit. Angular 2 being future-oriented by nature, we should lean towards first class H2 support (which already has 70% browser support), namely no more file concatenation but rather building a depCache. Additionally production file names should be versioned with the file content hashes in order to allow long-life cache headers.
The vendor part of this issue seems to have been addressed via https://github.com/angular/angular-cli/pull/163
Closing this. We will address this in the production environment build. Having different files for development is expected and makes the whole development process faster.
Please note that without a production build, the CLI is only useful for local development right now.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
Currently we're just transpiling the source files form TypeScript to JavaScript, and then having SystemJS load the individual files through ajax.
Instead of doing that, we want our broccoli pipeline to concatenate all the source files (output as System.register), and similar to ember-cli, have our apps load only 2 files: vendor.js and app.js
This should speed up the load of apps as they get big and contain a lot of small files.