Skip to content

Concatenate all source files #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rodyhaddad opened this issue Jul 14, 2015 · 5 comments
Closed

Concatenate all source files #5

rodyhaddad opened this issue Jul 14, 2015 · 5 comments

Comments

@rodyhaddad
Copy link
Contributor

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.

@vikeen
Copy link

vikeen commented Nov 17, 2015

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.

@laurentgoudet
Copy link

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.

@filipesilva
Copy link
Contributor

The vendor part of this issue seems to have been addressed via #163

@hansl
Copy link
Contributor

hansl commented Mar 16, 2016

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.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants