Skip to content

index.html only updated with scripts if it contains body-tag #19426

@NillDk

Description

@NillDk

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Yes, it works in Angular 10.
It doesn't work in Angular 11.

Description

We use Angular in conjunction with ASP.NET.
In our situation we want to add script-tags to a so-called partial view - a html-file not containing html- or body-tags.
This worked for us in Angular 10.
However, in Angular 11 the /dist/index.html is not updated with script-tags.

🔬 Minimal Reproduction

Create project: ng new angular11
Modify index.html to have blank content. Or at least not a body-tag.
Build: npm run build

🌍 Your Environment


Angular CLI: 11.0.1
Node: 12.18.0
OS: win32 x64

Angular: 11.0.0
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1100.1
@angular-devkit/build-angular   0.1100.1
@angular-devkit/core            11.0.1
@angular-devkit/schematics      11.0.1
@angular/cli                    11.0.1
@schematics/angular             11.0.1
@schematics/update              0.1100.1
rxjs                            6.6.3
typescript                      4.0.5

Anything else relevant?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions