|
1 | 1 | <!DOCTYPE html>
|
2 |
| -<!--[if lt IE 7 ]> <html lang="en" class="ie6" {% if(o.htmlWebpackPlugin.files.manifest) { %} manifest="{%= o.htmlWebpackPlugin.files.manifest %}"{% } %}> <![endif]--> |
3 |
| -<!--[if IE 7 ]> <html lang="en" class="ie7" {% if(o.htmlWebpackPlugin.files.manifest) { %} manifest="{%= o.htmlWebpackPlugin.files.manifest %}"{% } %}> <![endif]--> |
4 |
| -<!--[if IE 8 ]> <html lang="en" class="ie8" {% if(o.htmlWebpackPlugin.files.manifest) { %} manifest="{%= o.htmlWebpackPlugin.files.manifest %}"{% } %}> <![endif]--> |
5 |
| -<!--[if IE 9 ]> <html lang="en" class="ie9" {% if(o.htmlWebpackPlugin.files.manifest) { %} manifest="{%= o.htmlWebpackPlugin.files.manifest %}"{% } %}> <![endif]--> |
6 |
| -<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="" {% if(o.htmlWebpackPlugin.files.manifest) { %} manifest="{%= o.htmlWebpackPlugin.files.manifest %}"{% } %}> <!--<![endif]--> |
| 2 | +<!--[if lt IE 7 ]> <html lang="en" class="ie6" <% if(htmlWebpackPlugin.files.manifest) { %> manifest="<%= htmlWebpackPlugin.files.manifest %>"<% } %>> <![endif]--> |
| 3 | +<!--[if IE 7 ]> <html lang="en" class="ie7" <% if(htmlWebpackPlugin.files.manifest) { %> manifest="<%= htmlWebpackPlugin.files.manifest %>"<% } %>> <![endif]--> |
| 4 | +<!--[if IE 8 ]> <html lang="en" class="ie8" <% if(htmlWebpackPlugin.files.manifest) { %> manifest="<%= htmlWebpackPlugin.files.manifest %>"<% } %>> <![endif]--> |
| 5 | +<!--[if IE 9 ]> <html lang="en" class="ie9" <% if(htmlWebpackPlugin.files.manifest) { %> manifest="<%= htmlWebpackPlugin.files.manifest %>"<% } %>> <![endif]--> |
| 6 | +<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="" <% if(htmlWebpackPlugin.files.manifest) { %> manifest="<%= htmlWebpackPlugin.files.manifest %>"<% } %>> <!--<![endif]--> |
7 | 7 | <head>
|
8 | 8 | <meta charset="utf-8">
|
9 |
| - <title>{%=o.htmlWebpackPlugin.options.title || 'Webpack App'%}</title> |
| 9 | + <title><%= htmlWebpackPlugin.options.title || 'Webpack App'%></title> |
10 | 10 |
|
11 |
| - {% if (o.htmlWebpackPlugin.files.favicon) { %} |
12 |
| - <link rel="shortcut icon" href="{%=o.htmlWebpackPlugin.files.favicon%}"> |
13 |
| - {% } %} |
14 |
| - {% if (o.htmlWebpackPlugin.options.mobile) { %} |
| 11 | + <% if (htmlWebpackPlugin.files.favicon) { %> |
| 12 | + <link rel="shortcut icon" href="<%= htmlWebpackPlugin.files.favicon%>"> |
| 13 | + <% } %> |
| 14 | + <% if (htmlWebpackPlugin.options.mobile) { %> |
15 | 15 | <meta name="viewport" content="width=device-width, initial-scale=1">
|
16 |
| - {% } %} |
| 16 | + <% } %> |
17 | 17 |
|
18 |
| - {% for (var css in o.htmlWebpackPlugin.files.css) { %} |
19 |
| - <link href="{%=o.htmlWebpackPlugin.files.css[css] %}" rel="stylesheet"> |
20 |
| - {% } %} |
| 18 | + <% for (var css in htmlWebpackPlugin.files.css) { %> |
| 19 | + <link href="<%= htmlWebpackPlugin.files.css[css] %>" rel="stylesheet"> |
| 20 | + <% } %> |
21 | 21 | </head>
|
22 | 22 | <body>
|
23 |
| -{% if (o.htmlWebpackPlugin.options.unsupportedBrowser) { %} |
| 23 | +<% if (htmlWebpackPlugin.options.unsupportedBrowser) { %> |
24 | 24 | <style>.unsupported-browser { display: none; }</style>
|
25 | 25 | <div class="unsupported-browser">
|
26 | 26 | Sorry, your browser is not supported. Please upgrade to
|
27 | 27 | the latest version or switch your browser to use this site.
|
28 | 28 | See <a href="http://outdatedbrowser.com/">outdatedbrowser.com</a>
|
29 | 29 | for options.
|
30 | 30 | </div>
|
31 |
| -{% } %} |
| 31 | +<% } %> |
32 | 32 |
|
33 |
| -{% if (o.htmlWebpackPlugin.options.appMountId) { %} |
34 |
| -<div id="{%=o.htmlWebpackPlugin.options.appMountId%}"></div> |
35 |
| -{% } %} |
| 33 | +<% if (htmlWebpackPlugin.options.appMountId) { %> |
| 34 | +<div id="<%= htmlWebpackPlugin.options.appMountId%>"></div> |
| 35 | +<% } %> |
36 | 36 |
|
37 |
| -{% if (o.htmlWebpackPlugin.options.appMountIds && o.htmlWebpackPlugin.options.appMountIds.length > 0) { %} |
38 |
| -{% for (var index in o.htmlWebpackPlugin.options.appMountIds) { %} |
39 |
| -<div id="{%=o.htmlWebpackPlugin.options.appMountIds[index]%}"></div> |
40 |
| -{% } %} |
41 |
| -{% } %} |
| 37 | +<% if (htmlWebpackPlugin.options.appMountIds && htmlWebpackPlugin.options.appMountIds.length > 0) { %> |
| 38 | +<% for (var index in htmlWebpackPlugin.options.appMountIds) { %> |
| 39 | +<div id="<%= htmlWebpackPlugin.options.appMountIds[index]%>"></div> |
| 40 | +<% } %> |
| 41 | +<% } %> |
42 | 42 |
|
43 |
| -{% if (o.htmlWebpackPlugin.options.window) { %} |
| 43 | +<% if (htmlWebpackPlugin.options.window) { %> |
44 | 44 | <script>
|
45 |
| - {% for (var varName in o.htmlWebpackPlugin.options.window) { %} |
46 |
| - window['{%=varName%}'] = {%#JSON.stringify(o.htmlWebpackPlugin.options.window[varName])%}; |
47 |
| - {% } %} |
| 45 | + <% for (var varName in htmlWebpackPlugin.options.window) { %> |
| 46 | + window['<%=varName%>'] = <%= JSON.stringify(htmlWebpackPlugin.options.window[varName]) %>; |
| 47 | + <% } %> |
48 | 48 | </script>
|
49 |
| -{% } %} |
| 49 | +<% } %> |
50 | 50 |
|
51 |
| -{% for (var chunk in o.htmlWebpackPlugin.files.chunks) { %} |
52 |
| -<script src="{%=o.htmlWebpackPlugin.files.chunks[chunk].entry %}"></script> |
53 |
| -{% } %} |
| 51 | +<% for (var chunk in htmlWebpackPlugin.files.chunks) { %> |
| 52 | +<script src="<%= htmlWebpackPlugin.files.chunks[chunk].entry %>"></script> |
| 53 | +<% } %> |
54 | 54 |
|
55 |
| -{% if (o.htmlWebpackPlugin.options.devServer) { %} |
56 |
| -<script src="{%=o.htmlWebpackPlugin.options.devServer%}/webpack-dev-server.js"></script> |
57 |
| -{% } %} |
| 55 | +<% if (htmlWebpackPlugin.options.devServer) { %> |
| 56 | +<script src="<%= htmlWebpackPlugin.options.devServer%>/webpack-dev-server.js"></script> |
| 57 | +<% } %> |
58 | 58 |
|
59 |
| -{% if (o.htmlWebpackPlugin.options.googleAnalytics) { %} |
| 59 | +<% if (htmlWebpackPlugin.options.googleAnalytics) { %> |
60 | 60 | <script>
|
61 | 61 | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
62 | 62 | (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
63 | 63 | m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
64 | 64 | })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
65 | 65 |
|
66 | 66 |
|
67 |
| - {% if (o.htmlWebpackPlugin.options.googleAnalytics.trackingId) { %} |
68 |
| - ga('create', '{%=o.htmlWebpackPlugin.options.googleAnalytics.trackingId%}', 'auto'); |
69 |
| - {% } else { throw new Error("html-webpack-template requires googleAnalytics.trackingId config"); }%} |
| 67 | + <% if (htmlWebpackPlugin.options.googleAnalytics.trackingId) { %> |
| 68 | + ga('create', '<%= htmlWebpackPlugin.options.googleAnalytics.trackingId%>', 'auto'); |
| 69 | + <% } else { throw new Error("html-webpack-template requires googleAnalytics.trackingId config"); }%> |
70 | 70 |
|
71 |
| - {% if (o.htmlWebpackPlugin.options.googleAnalytics.pageViewOnLoad) { %} |
| 71 | + <% if (htmlWebpackPlugin.options.googleAnalytics.pageViewOnLoad) { %> |
72 | 72 | ga('send', 'pageview');
|
73 |
| - {% } %} |
| 73 | + <% } %> |
74 | 74 | </script>
|
75 |
| -{% } %} |
| 75 | +<% } %> |
76 | 76 | </body>
|
77 | 77 | </html>
|
0 commit comments