Skip to content

Inline inline.js #2307

Description

@kylecordes

This is a feature request as of beta.15, rest of the issue template elided.

Currently ng build --prod yields a set of files like so:

$ ls -l dist
-rw-r--r-- 1 ubuntu ubuntu 523 Sep 23 11:57 index.html
-rw-r--r-- 1 ubuntu ubuntu 1388 Sep 23 11:57 inline.js
-rw-r--r-- 1 ubuntu ubuntu 833489 Sep 23 11:57 main.62117700d901524c314e.bundle.js
-rw-r--r-- 1 ubuntu ubuntu 188979 Sep 23 11:57 main.62117700d901524c314e.bundle.js.gz
-rw-r--r-- 1 ubuntu ubuntu 3970 Sep 23 11:57 styles.b52d2076048963e7cbfd.bundle.js

Upon inspection of the the index.html and inline.js contents, it appears that the contents of inline.js were probably intended, at some point in the design or implementation process, to be inlined inside index.html, saving one HTTP round-trip in the results. Thus, a feature request to inline the inline.

Related to this, a question: it appears the styles could be included in the main bundle - is there a reason they need to be kept separate (costing another HTTP request) in a prod build? If not, please include in main bundle.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions