How to avoid closing body and html tags in output file?
See original GitHub issueHello! Is it possible to exclude closing body and html tags from the output file? The plugin puts these tags automatically, but I want to avoid this. My template looks like this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>My template</title>
</head>
<body>
<!-- some code -->
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
Can you leave out closing tags in HTML for tags that extend ...
1 Answer 1 ... You should ALWAYS close your tags. Most browsers are "forgiving" ... but that doesn't make it "right". You should...
Read more >HTML tags should not be automatically closed in template ...
The problem is that it's trying too hard to close that <head> tag, but in HTML both the opening <head> tag and closing...
Read more >WebD2: Common HTML Tags - University of Washington
Examples are images and line breaks. XHTML is more strict than HTML, and requires that all open tags must be closed, even if...
Read more >What are Self Closing Tags in HTML? - Scaler Topics
This article by Scaler Topics will cover what self-closing tags in HTML along with their syntax, attribute values, and examples.
Read more >The Document Body element - HTML - MDN Web Docs - Mozilla
The start tag may be omitted if the first thing inside it is not a space character, comment, <script> element or <style> element....
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 FreeTop 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
Top GitHub Comments
@Sigizmund2012 try to modify
index.js
like this:and your
webpack.config.js
:But in the critical module there is an opportunity to get the HTML source code and modify it. There is no such possibility in html-critical-webpack-plugin.