-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
37 lines (26 loc) · 833 Bytes
/
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
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>Conditioner ES6 Boilerplate</title>
</head>
<body>
<div data-module="component" data-context="@media (min-width:30em)"></div>
<script>
import('./node_modules/conditioner-core/conditioner-core.esm.js').then(conditioner => {
// correct module name location
conditioner.addPlugin({
// get the module constructor
moduleGetConstructor: (module) => module.default,
// fetch module with dynamic import
moduleImport: (name) => import(name),
// converts module aliases to paths
moduleSetName: (name) => `/ui/${ name }.js`
});
// lets go!
conditioner.hydrate( document.documentElement );
});
</script>
</body>
</html>