-
Notifications
You must be signed in to change notification settings - Fork 10
/
template.dev.ejs
35 lines (32 loc) · 1.05 KB
/
template.dev.ejs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html lang="<%= htmlWebpackPlugin.options.lang %>">
<head>
<% if (htmlWebpackPlugin.files.favicon) { %>
<link rel="shortcut icon" href="<%= htmlWebpackPlugin.files.favicon%>">
<% } %>
<meta charset="utf-8">
<title><%= htmlWebpackPlugin.options.title %></title>
<% for (const css of htmlWebpackPlugin.files.css) { %>
<link href="<%= css %>" rel="stylesheet">
<% } %>
</head>
<body>
<div id="<%= htmlWebpackPlugin.options.appMountId %>"></div>
<% const background = '/assets/' + htmlWebpackPlugin.options.webextBackground + '.js' %>
<% for (const js of htmlWebpackPlugin.files.js) { %>
<% if (js !== background) { %>
<script src="<%= js %>"></script>
<% } %>
<% } %>
<% if (htmlWebpackPlugin.options.webextBackground) { %>
<iframe
style="position: absolute;"
id="webext-background"
width="0"
height="0"
frameborder="0"
srcdoc="<script src='<%= background %>'></script>"
></iframe>
<% } %>
</body>
</html>