diff --git a/index.js b/index.js
index 7838ba1..ea0c0ce 100644
--- a/index.js
+++ b/index.js
@@ -23,7 +23,8 @@ function HtmlWebpackPlugin (options) {
showErrors: true,
chunks: 'all',
excludeChunks: [],
- title: 'Webpack App'
+ title: 'Webpack App',
+ xhtml: false
}, options);
}
@@ -415,9 +416,11 @@ HtmlWebpackPlugin.prototype.injectAssetsIntoHtml = function (html, assets) {
var scripts = assets.js.map(function (scriptPath) {
return '';
});
+ // Make tags self-closing in case of xhtml
+ var xhtml = this.options.xhtml ? '/' : '';
// Turn css files into link tags
var styles = assets.css.map(function (stylePath) {
- return '';
+ return '';
});
// Injections
var htmlRegExp = /(]*>)/i;
@@ -428,7 +431,7 @@ HtmlWebpackPlugin.prototype.injectAssetsIntoHtml = function (html, assets) {
// If there is a favicon present, add it to the head
if (assets.favicon) {
- head.push('');
+ head.push('');
}
// Add styles to the head
head = head.concat(styles);