wuxiang da9bc82d52 commit %!s(int64=2) %!d(string=hai) anos
..
build da9bc82d52 commit %!s(int64=2) %!d(string=hai) anos
README.md da9bc82d52 commit %!s(int64=2) %!d(string=hai) anos
main.js da9bc82d52 commit %!s(int64=2) %!d(string=hai) anos
template.ejs da9bc82d52 commit %!s(int64=2) %!d(string=hai) anos
webpack.config.js da9bc82d52 commit %!s(int64=2) %!d(string=hai) anos

README.md

HTML webpack plugin interop

When using html-webpack-plugin along with sprite-loader in extract mode it is possible to inline sprite content directly to the page. All extracted sprites stored in htmlWebpackPlugin.files.sprites template variable. It's an object where key is a sprite filename and value - file contents (Object<filename:string, content:string>).

Demo

Template example

...
<body>

<% if (htmlWebpackPlugin.files.sprites) { %>
  <% for (var spriteFileName in htmlWebpackPlugin.files.sprites) { %>
    <%= htmlWebpackPlugin.files.sprites[spriteFileName] %>
  <% } %>
<% } %>

</body>
...