Skip to content

Commit

Permalink
Update to html-webpack-plugin v2
Browse files Browse the repository at this point in the history
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 webpack-contrib/html-loader#17
  • Loading branch information
shaun554 committed Jan 12, 2016
1 parent ca1b990 commit 47375d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions webpack/makewebpackconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ module.exports = function(options) {
}, {
test: /\.jpe?g$|\.gif$|\.png$/i,
loader: "url-loader?limit=10000"
},
{
test: /\.html$/,
loader: 'html-loader'
}
]
},
Expand Down

0 comments on commit 47375d3

Please sign in to comment.