forked from yugasun/x-chart
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.cache.html
More file actions
58 lines (58 loc) · 1.51 KB
/
index.cache.html
File metadata and controls
58 lines (58 loc) · 1.51 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="shortcut icon" href=./favicon.ico>
<title><%= htmlWebpackPlugin.options.title %></title>
<!-- inject bowl.js -->
<script src="./static/bowljs/bowl.min.js"></script>
</head>
<body>
<div id="app">
<p>Loading...</p>
</div>
<script>
<% var resources = [];
var keys = ["manifest", "vendor", "app"];
var dependecies = [
0,
[keys[0]],
[keys[0], keys[1]],
];
// css
for (var css in htmlWebpackPlugin.files.css) {
resources.push({
/**
* Add prefix '/x-chart' just for gh-pages deployment,
* For your own project remove it.
*/
url: '/x-chart' + htmlWebpackPlugin.files.css[css],
key: 'style',
});
}
// js
var i = -1;
for (var chunk in htmlWebpackPlugin.files.chunks) {
i++;
resources.push({
/**
* Add prefix '/x-chart' just for gh-pages deployment,
* For your own project remove it.
*/
url: '/x-chart' + htmlWebpackPlugin.files.chunks[chunk].entry,
key: keys[i],
dependencies: dependecies[i] || [],
});
} %>
/**
* https://github.com/ElemeFE/bowl
* Using Bowl for cache
*/
var b = new Bowl();
b.add(<%= JSON.stringify(resources) %>);
b.inject();
</script>
</body>
</html>