Skip to content

Update index.html MIME type from 'text/javascript' to 'application/javascript' #2316

@SafeEval

Description

@SafeEval

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Linux

  1. Versions. Please run ng --version. If there's nothing outputted, please run
    in a Terminal: node --version and paste the result here:

angular-cli: 1.0.0-beta.15
node: 6.2.2
os: linux x64

  1. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.

This is a basic default application, generated and built with the angular-cli. Following the defaults, the resulting build is stored in dist/.

ng new myproject
ng build
  1. The log given by the failure. Normally this include a stack trace and some
    more information.

N/A

  1. Mention any other details that might be useful.

The generated dist/index.html file contains the following line:

<script type="text/javascript" src="inline.js"></script><script type="text/javascript" src="styles.bundle.js"></script><script type="text/javascript" src="main.bundle.js"></script></body>

RFC 4329 Secion 7.1 says that the MIME type "text/javascript" is considered obsolete, in favor of "application/javascript".

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