Skip to content

Concatenate all source files  #5

Closed

Description

@rodyhaddad

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.

Activity

  1. vikeen commented on Nov 17, 2015

    @vikeen

    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.

  2. laurentgoudet commented on Jan 8, 2016

    @laurentgoudet

    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.

  3. filipesilva commented on Jan 31, 2016

    @filipesilva
    Contributor

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

  4. hansl commented on Mar 16, 2016

    @hansl
    Contributor

    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.

  5. angular-automatic-lock-bot commented on Sep 5, 2019

    @angular-automatic-lock-bot

    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.

  6. locked and limited conversation to collaborators on Sep 5, 2019
  7. added a commit that references this issue on Jul 14, 2026
    100d662
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions