ee357834168a4404cc091c5752abc063aac3bbb22e38046b0dc5146dd6dcd3f516b493040d595e4e903136fd719b584b0f7e2acf450f8a044af173ad53a610 702 B

1234567891011121314151617181920212223
  1. # HTML webpack plugin interop
  2. When using [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) along with sprite-loader in extract mode it is possible
  3. to inline sprite content directly to the page. All extracted sprites stored in `htmlWebpackPlugin.files.sprites` template variable.
  4. It's an object where key is a sprite filename and value - file contents (`Object<filename:string, content:string>`).
  5. ### [Demo](build/index.html)
  6. ### Template example
  7. ```ejs
  8. ...
  9. <body>
  10. <% if (htmlWebpackPlugin.files.sprites) { %>
  11. <% for (var spriteFileName in htmlWebpackPlugin.files.sprites) { %>
  12. <%= htmlWebpackPlugin.files.sprites[spriteFileName] %>
  13. <% } %>
  14. <% } %>
  15. </body>
  16. ...
  17. ```