webpack-contrib / mini-css-extract-plugin

Lightweight CSS extraction plugin
MIT License
4.67k stars 388 forks source link

Insert Closing slash #965

Closed Vanillma closed 2 years ago

Vanillma commented 2 years ago

Bug report

hi bro I noticed that this plugin does not put the final slash when linking the css file to the head!! IMG_20220808_194044_891

Actual Behavior

Expected Behavior

How Do We Reproduce?

Please paste the results of npx webpack-cli info here, and mention other relevant information

alexander-akait commented 2 years ago

Because you don't need / in HTML5

Vanillma commented 2 years ago

Because you don't need / in HTML5

But it is required in xhtml! I think it's better to put an option to configure this apparently unimportant slash... because we run into problems with xhtml... also there may be other things that conflict with xhtml!!!

alexander-akait commented 2 years ago

Your doctype is not xhtml, your doctype is HTML5, look at your source code

Vanillma commented 2 years ago

Your doctype is not xhtml, your doctype is HTML5, look at your source code

But I have heard in training courses that using xhtml rules (not doctype) in creating html improves performance in old browsers and their interpretation!! Something like the use strict JavaScript that is written more accurately and logically! what is your comment?

alexander-akait commented 2 years ago

XHTML is deprecated and is not reccomend (w3 and whatwg) to use (except when you are implementing something for really legacy systems). Most of browsers use html5 spec parser, so my opinion is not to use XHTML. Even more your code is not XHTML valid so you still will have validations problems (and even problems with parser and probably your content will not render as you expceted).