-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: better html-webpack-plugin interop in extract mode
Now html-webpack-plugin's template context contains htmlWebpackPlugin.files.sprites property (Object<filename:string, content:string>). It can be used to inline extracted sprite content directly in page markup. See test/fixtures/html-webpack-plugin/template.ejs for example. ISSUES CLOSED: #194
- Loading branch information
Showing
4 changed files
with
35 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title><%= htmlWebpackPlugin.options.title %></title> | ||
</head> | ||
<body> | ||
<% if (htmlWebpackPlugin.files.sprites) { %> | ||
<% for (var spriteFileName in htmlWebpackPlugin.files.sprites) { %> | ||
<%= htmlWebpackPlugin.files.sprites[spriteFileName] %> | ||
<% } %> | ||
<% } %> | ||
|
||
<img src="../img/image.svg" alt=""> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters