-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathindex.html
55 lines (55 loc) · 1.86 KB
/
index.html
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
<html>
<head>
<title>Test Fixture Loader</title>
</head>
<body>
<h2>Test Fixture Loader</h2>
<p>
As a debugging helper, this page provides a general loader into known paths to built fixtures.
</p>
<p>
Examples:
<ul>
<li>
<a href="./index.html?script=./simple/dist-development-5/bundle.js">
<code>./simple/dist-development-5/bundle.js</code>
</a>
</li>
<li>
<a href="./index.html?script=./moment-app/dist-development-5/bundle.js">
<code>./moment-app/dist-development-5/bundle.js</code>
</a>
</li>
<li>
<em>(broken - webpack1 bug)</em><br />
<a href="./index.html?script=./multiple-chunks/dist-development-1/bundle-multiple.js">
<code>./multiple-chunks/dist-development-1/bundle-multiple.js</code>
</a>
</li>
<li>
<a href="./index.html?script=./multiple-chunks/dist-development-5/bundle-multiple.js">
<code>./multiple-chunks/dist-development-5/bundle-multiple.js</code>
</a>
</li>
</ul>
</p>
<p>
(<em>Note</em>: code-splitting with dynamic <code>import</code>/<code>require.ensure</code> presently does not work because of an incorrectly inferred root location (this page instead of relative to the bundle).
</p>
<script src="https://unpkg.com/[email protected]/dist/little-loader.min.js"></script>
<script>
const urlParams = new URLSearchParams(window.location.search);
const script = urlParams.get("script");
if (script) {
console.log(`Loading ${script}`);
_lload(script, (err) => {
if (err) {
console.error(`Error: ${script}`, err);
} else {
console.log(`Finished ${script}`);
}
});
}
</script>
</body>
</html>