Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0952b3a810 | |||
| 05d6694743 | |||
| 52f53faf45 | |||
| a252bca92c |
@@ -1,6 +1,10 @@
|
||||
Change History
|
||||
==============
|
||||
|
||||
v2.16.2
|
||||
----
|
||||
* Fix bug introduced by 2.16.2. Fixes #315
|
||||
|
||||
v2.16.1
|
||||
----
|
||||
* Fix hot module replacement for webpack 2.x
|
||||
|
||||
@@ -94,8 +94,7 @@ Here's an example webpack config illustrating how to use these options:
|
||||
entry: 'index.js',
|
||||
output: {
|
||||
path: 'dist',
|
||||
filename: 'index_bundle.js',
|
||||
hash: true
|
||||
filename: 'index_bundle.js'
|
||||
},
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
@@ -138,8 +137,8 @@ and favicon files into the markup.
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
title: 'Custom template',
|
||||
template: 'my-index.ejs', // Load a custom template
|
||||
inject: 'body' // Inject all scripts into the body
|
||||
template: 'my-index.ejs', // Load a custom template (ejs by default but can be changed)
|
||||
inject: 'body' // Inject all scripts into the body (this is the default so you can skip it)
|
||||
})
|
||||
]
|
||||
```
|
||||
|
||||
+1
@@ -50,6 +50,7 @@
|
||||
/* 1 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
'use strict';
|
||||
__webpack_require__(0);
|
||||
|
||||
|
||||
+1
@@ -52,6 +52,7 @@
|
||||
/* 1 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
'use strict';
|
||||
__webpack_require__(0);
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
/* 2 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
'use strict';
|
||||
__webpack_require__(0);
|
||||
// Use the same template for the frontend code
|
||||
@@ -86,6 +87,7 @@
|
||||
/* 4 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
/* 0 */
|
||||
/***/ function(module, exports) {
|
||||
|
||||
"use strict";
|
||||
eval("// This file is used for frontend and backend\n'use strict';\n\n// If compiled by the html-webpack-plugin\n// HTML_WEBPACK_PLUGIN is set to true:\nvar backend = typeof HTML_WEBPACK_PLUGIN !== 'undefined';\n\nmodule.exports = function () {\n return 'Hello World from ' + (backend ? 'backend' : 'frontend');\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./universial.js\n ** module id = 0\n ** module chunks = 0\n **/\n\n//# sourceURL=webpack:///./universial.js?");
|
||||
|
||||
/***/ },
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
/* 0 */
|
||||
/***/ function(module, exports) {
|
||||
|
||||
"use strict";
|
||||
eval("// This file is used for frontend and backend\n'use strict';\n\n// If compiled by the html-webpack-plugin\n// HTML_WEBPACK_PLUGIN is set to true:\nvar backend = typeof HTML_WEBPACK_PLUGIN !== 'undefined';\n\nmodule.exports = function () {\n return 'Hello World from ' + (backend ? 'backend' : 'frontend');\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./universial.js\n ** module id = 0\n ** module chunks = 0\n **/\n\n//# sourceURL=webpack:///./universial.js?");
|
||||
|
||||
/***/ },
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
<head><link href="styles.css" rel="stylesheet"></head>Hello World from backend2016-04-25T17:25:34.826Z<h2>Partial</h2>
|
||||
<head><link href="styles.css" rel="stylesheet"></head>Hello World from backend2016-05-13T09:44:48.061Z<h2>Partial</h2>
|
||||
<img src="0714810ae3fb211173e2964249507195.png"><script src="bundle.js"></script>
|
||||
@@ -359,7 +359,7 @@ HtmlWebpackPlugin.prototype.filterChunks = function (webpackStatsJson, includedC
|
||||
};
|
||||
|
||||
HtmlWebpackPlugin.prototype.isHotUpdateCompilation = function (assets) {
|
||||
return assets.js.every(function (name) {
|
||||
return assets.js.length && assets.js.every(function (name) {
|
||||
return /\.hot-update\.js$/.test(name);
|
||||
});
|
||||
};
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "html-webpack-plugin",
|
||||
"version": "2.16.1",
|
||||
"version": "2.16.2",
|
||||
"description": "Simplifies creation of HTML files to serve your webpack bundles",
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
|
||||
Reference in New Issue
Block a user