From 3ef11d38db31ace0fc858a0ff3d05e47a6a374ef Mon Sep 17 00:00:00 2001 From: whiteghostDev Date: Tue, 12 Jan 2016 11:11:48 +0100 Subject: [PATCH] Update to html-webpack-plugin v2 This is still a prerelease, but it's almost finished so updating it on this branch is no problem. Thanks to @jantimon for the amazing work. v2 lets you load html files with loaders, so we now use html-loader to load the index.html file, which automatically require()s all img tags specified in the HTML file. This doesn't yet solve the meta image problem, but I've added to an issue in the html-loader repo and hope that this will be resolved soon! See https://github.com/webpack/html-loader/issues/17 --- package.json | 3 ++- webpack/makewebpackconfig.js | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 39ef76c..e3a5952 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,8 @@ "expect-jsx": "2.2.1", "extract-text-webpack-plugin": "0.9.1", "file-loader": "^0.8.4", - "html-webpack-plugin": "^1.6.1", + "html-loader": "0.4.0", + "html-webpack-plugin": "^2.6.1", "ip": "1.1.0", "json-loader": "^0.5.2", "mocha": "^2.3.2", diff --git a/webpack/makewebpackconfig.js b/webpack/makewebpackconfig.js index 1837053..eb4cd04 100644 --- a/webpack/makewebpackconfig.js +++ b/webpack/makewebpackconfig.js @@ -147,6 +147,10 @@ module.exports = function(options) { }, { test: /\.jpe?g$|\.gif$|\.png$/i, loader: "url-loader?limit=10000" + }, + { + test: /\.html$/, + loader: 'html-loader' } ] },