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:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@SanderElias will do, but I need to focus on billable work for the rest of this decade 😁
that is done by puppeteer. look in the pupeteerrenderer