|  | vor 3 Jahren | |
|---|---|---|
| .. | ||
| build | vor 3 Jahren | |
| README.md | vor 3 Jahren | |
| main.js | vor 3 Jahren | |
| template.ejs | vor 3 Jahren | |
| webpack.config.js | vor 3 Jahren | |
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>).
...
<body>
<% if (htmlWebpackPlugin.files.sprites) { %>
  <% for (var spriteFileName in htmlWebpackPlugin.files.sprites) { %>
    <%= htmlWebpackPlugin.files.sprites[spriteFileName] %>
  <% } %>
<% } %>
</body>
...