Skip to content

mime types are not set with version 8 #15094

@fareshan

Description

@fareshan

#14468 🐞 Bug report

Command (mark with an x)

- [ ] new
- [X] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

I had this issue after upgrading from angular 7 to 8

Description

In previous version, the generated JS files were indexed in index.html like this:

<script type="text/javascript" src="runtime.xxx.js"></script>

Now, I am getting it without the mime-types:

<script src="runtime.xxx.js"></script>

And this is giving this error in the browser:
MIME type ('text/html') is not executable, and strict MIME type checking is enabled

🔬 Minimal Reproduction

ng build --prod

🔥 Exception or Error


MIME type ('text/html') is not executable, and strict MIME type checking is enabled

🌍 Your Environment


Angular CLI: 8.1.1
Node: 10.16.0
OS: darwin x64
Angular: 8.1.1
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.801.1
@angular-devkit/build-angular     0.801.1
@angular-devkit/build-optimizer   0.801.1
@angular-devkit/build-webpack     0.801.1
@angular-devkit/core              8.1.1
@angular-devkit/schematics        8.1.1
@angular/http                     7.2.15
@angular/pwa                      0.801.1
@ngtools/webpack                  8.1.1
@schematics/angular               8.1.1
@schematics/update                0.801.1
rxjs                              6.5.2
typescript                        3.4.5
webpack                           4.35.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions