question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cli: edge case where <!doctype html> is removed from dist/static/index.html

See original GitHub issue

🐞 Bug report

Description

In some edge cases, the <!doctype html> in src/index.html and dist/web/index.html is removed in the generated dist/static/index.html.

🔬 Minimal Reproduction

TBD. I reproduced this in one app, but not in a new CLI app. Investigating…

💻Your Environment

Angular Version:


Angular CLI: 9.0.0-rc.7
Node: 12.13.0
OS: darwin x64

Angular: 9.0.0-rc.7
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.0-rc.6
@angular-devkit/build-angular     0.900.0-rc.7
@angular-devkit/build-optimizer   0.900.0-rc.7
@angular-devkit/build-webpack     0.900.0-rc.7
@angular-devkit/core              9.0.0-rc.6
@angular-devkit/schematics        9.0.0-rc.6
@angular/cdk                      9.0.0-rc.6
@angular/fire                     5.2.3
@angular/material                 9.0.0-rc.6
@ngtools/webpack                  9.0.0-rc.7
@schematics/angular               9.0.0-rc.6
@schematics/update                0.900.0-rc.7
rxjs                              6.5.3
typescript                        3.6.4
webpack                           4.41.2

Scully Version:


    "@scullyio/init": "0.0.9",
    "@scullyio/ng-lib": "latest",
    "@scullyio/scully": "latest",

🔥 Exception or Error


Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.
_checkDoctypeIsDefined @ vendor-es2015.js:84784

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Splaktarcommented, Dec 30, 2019

@SanderElias will do, but I need to focus on billable work for the rest of this decade 😁

1reaction
SanderEliascommented, Dec 21, 2019

that is done by puppeteer. look in the pupeteerrenderer

Read more comments on GitHub >

github_iconTop Results From Across the Web

DocumentType.remove() - Web APIs - MDN Web Docs
The DocumentType.remove() method removes a document's doctype. ... DOCTYPE html>' document.doctype.remove(); document.doctype; // null
Read more >
Why does removing doctype on html slightly shift some on ...
In some cases, like with my generated table data, the exact same code appears differently in different spots when comparing the same page...
Read more >
Fix Your Site With the Right DOCTYPE! - A List Apart
Per HTML and XHTML standards, a DOCTYPE (short for “document type declaration”) informs the validator which version of (X)HTML you're using, and must...
Read more >
Activating Browser Modes with Doctype - Henri Sivonen
Explains how browsers use doctype sniffing to switch the engine mode between the quirks mode and the standards mode.
Read more >
HTML doctype declaration - W3Schools
Tips and Notes. Tip: The <!DOCTYPE> declaration is NOT case sensitive. Examples. <!DOCTYPE html>.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found