-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
template.ejs
40 lines (38 loc) · 1001 Bytes
/
template.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
36
37
38
39
40
<%
const {
generateAttributes,
generateHeadTags,
generateBodyTags,
generateWebpackCSSReferences,
generateWebpackJSReferences
} = require('./template-utils');
const {
options: {
title = '',
head = {},
body = {},
attributes: {
html: htmlAttrs = {},
head: headAttrs = {},
css: cssAttrs = {},
body: bodyAttrs = {},
js: jsAttrs = {}
} = {}
},
files
} = htmlWebpackPlugin;
%>
<!doctype html>
<html <%= generateAttributes(htmlAttrs) %> >
<head <%= generateAttributes(headAttrs) %> >
<meta charset="utf-8">
<title><%= title %></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<%= generateHeadTags(head) %>
<%= generateWebpackCSSReferences(files, webpackConfig, cssAttrs) %>
</head>
<body <%= generateAttributes(bodyAttrs) %> >
<%= generateBodyTags(body) %>
<%= generateWebpackJSReferences(files, webpackConfig, jsAttrs) %>
</body>
</html>