-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
/
index.html
36 lines (26 loc) · 1.16 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
<h1>Optimize Deps</h1>
<h2>CommonJS w/ named imports (react)</h2>
<div class="cjs"></div>
<script type="module" src="./cjs.js"></script>
<h2>CommonJS dynamic import (react)</h2>
<div class="cjs-dynamic"></div>
<script type="module" src="./cjs-dynamic.js"></script>
<h2>Dedupe (dep in linked & optimized package)</h2>
<div class="dedupe"></div>
<script type="module" src="./dedupe.js"></script>
<h2>CommonJS w/ browser field mapping (axios)</h2>
<div>This should show ping: <span class="cjs-browser-field"></span></div>
<h2>Detecting linked src package and optimizing its deps (lodash-es)</h2>
<div>This should show fooBarBaz: <span class="deps-linked"></span></div>
<h2>Optimizing force included dep even when it's linked</h2>
<div class="force-include"></div>
<script type="module">
import axios from 'axios'
axios.get('/ping').then((res) => {
document.querySelector('.cjs-browser-field').textContent = res.data
})
import { camelCase } from 'optimize-deps-linked'
document.querySelector('.deps-linked').textContent = camelCase('foo-bar-baz')
import { msg } from 'optimize-deps-linked-include'
document.querySelector('.force-include').textContent = msg
</script>