Skip to content

Commit 3586ea8

Browse files
Update to Preact CLI (#273)
Update to Preact CLI
2 parents 288930d + 370c33c commit 3586ea8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+20347
-9115
lines changed

.babelrc

Lines changed: 0 additions & 11 deletions
This file was deleted.

.snyk

Lines changed: 0 additions & 11 deletions
This file was deleted.

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: node_js
22
node_js:
3-
- 6
3+
- 10
44
script: npm run build
55
after_success:
66
- if [[ "${TRAVIS_BRANCH}" == "master" && "${TRAVIS_PULL_REQUEST}" == "false" ]]; then npm run deploy -s; fi

CHANGELOG.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
### Preact Website Update
2+
3+
**Size before:** _(via [size-plugin](https://github.com/googlechromelabs/size-plugin))
4+
5+
WPT: https://www.webpagetest.org/result/181210_P8_82a008b7a17bc1c55c61197672205e93/
6+
LH: https://www.webpagetest.org/lighthouse.php?test=181210_P8_82a008b7a17bc1c55c61197672205e93&run=3
7+
8+
```
9+
a3d80eb575b803a6508e.worker.js ⏤ 216 kB
10+
bundle.js ⏤ 33.6 kB
11+
1.80d97f20c0fd15d2e7c6.chunk.js ⏤ 3.21 kB
12+
2.f0ec73293bbbd9656786.chunk.js ⏤ 8.77 kB
13+
repl.96b61a2ae529b974054a.chunk.js ⏤ 70.1 kB
14+
style.css ⏤ 6.66 kB
15+
index.html ⏤ 2.23 kB
16+
sw.js ⏤ 10 kB (+2 B)
17+
appcache/manifest.html ⏤ 66 B
18+
```
19+
20+
**Size After:**
21+
22+
```
23+
247ee39acd39bae81efc.worker.js ⏤ 217 kB
24+
bundle.js ⏤ 33.8 kB
25+
1.********************.chunk.js ⏤ 3.21 kB
26+
2.********************.chunk.js ⏤ 8.77 kB
27+
repl.********************.chunk.js ⏤ 71.9 kB (+1.71 kB)
28+
style.css ⏤ 6.66 kB
29+
index.html ⏤ 2.23 kB
30+
sw.js ⏤ 10 kB (-8 B)
31+
appcache/manifest.html ⏤ 66 B
32+
```
33+
34+
### RCA
35+
36+
- bundle.js increased by 1.5kB because of marked: (+2kB to 7.2kB: https://bundlephobia.com/[email protected])
37+
- highlight.js increased in size dramatically over the past few releases, though we're subsetting
38+
- polyfills increased in size. switch from fetch to unfetch helped, code-splitting removed the issue entirely
39+
- classnames increased in size a bit. it also isn't getting bundled optimally due to a nonstandard UMD wrapper
40+
- FCP was always a bit bad since only the app shell is prerendered
41+
42+
**After webpack + dep updates:**
43+
44+
```
45+
ae1ee828a2ca1fab34e4.worker.js ⏤ 214 kB
46+
editor.44a85.css ⏤ 2.14 kB
47+
editor.452bc.chunk.js ⏤ 69 kB
48+
emoji.d52cc.chunk.js ⏤ 8.75 kB
49+
main.3b5f6.css ⏤ 6.6 kB
50+
main.js ⏤ 29.9 kB
51+
offline.e400f.chunk.js ⏤ 801 B
52+
polyfills.js ⏤ 2.01 kB
53+
repl.45b46.css ⏤ 899 B
54+
repl.34587.chunk.js ⏤ 2.28 kB
55+
index.html ⏤ 2.22 kB
56+
sw.js ⏤ 10.4 kB (+2 B)
57+
appcache/manifest.html ⏤ 86 B
58+
```
59+
60+
| Metric | Start | Final |
61+
|-------------|--------|--------|
62+
| FCP | 1300ms | 1300ms |
63+
| TTI | 5900ms | 2950ms |
64+
| Speed Index | 2380ms | 1910ms |

content/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ toc: false
1919
<a href="/guide/switching-to-preact" class="home-button">Switch to Preact</a>
2020
</p>
2121
<p>
22-
<github-stars user="developit" repo="preact">19,000+</github-stars>
22+
<github-stars user="developit" repo="preact">20,000+</github-stars>
2323
</p>
2424
</jumbotron>
2525

@@ -185,7 +185,7 @@ export default class Stars extends Component {
185185
this.setState({ stars });
186186
}
187187
render({ repo }, { stars=0 }) {
188-
let url = \`//github.com/${repo}\`;
188+
let url = \`https://github.com/${repo}\`;
189189
return (
190190
&lt;a href={url} class="stars"&gt;
191191
⭐️ {stars} Stars

content/lang/de/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export default class Stars extends Component {
183183
this.setState({ stars });
184184
}
185185
render({ repo }, { stars=0 }) {
186-
let url = \`//github.com/${repo}\`;
186+
let url = \`https://github.com/${repo}\`;
187187
return (
188188
&lt;a href={url} class="stars"&gt;
189189
⭐️ {stars} Stars

content/lang/es/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export default class Stars extends Component {
186186
this.setState({ stars });
187187
}
188188
render({ repo }, { stars=0 }) {
189-
let url = \`//github.com/${repo}\`;
189+
let url = \`https://github.com/${repo}\`;
190190
return (
191191
&lt;a href={url} class="stars"&gt;
192192
⭐️ {stars} Stars

content/lang/fr/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export default class Stars extends Component {
181181
this.setState({ stars });
182182
}
183183
render({ repo }, { stars=0 }) {
184-
let url = \`//github.com/${repo}\`;
184+
let url = \`https://github.com/${repo}\`;
185185
return (
186186
&lt;a href={url} class="stars"&gt;
187187
⭐️ {stars} Stars

content/lang/it/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ export default class Stars extends Component {
185185
this.setState({ stars });
186186
}
187187
render({ repo }, { stars=0 }) {
188-
let url = \`//github.com/${repo}\`;
188+
let url = \`https://github.com/${repo}\`;
189189
return (
190190
&lt;a href={url} class="stars"&gt;
191191
⭐️ {stars} Stars

content/lang/pt-br/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ export default class Stars extends Component {
185185
this.setState({ stars });
186186
}
187187
render({ repo }, { stars=0 }) {
188-
let url = \`//github.com/${repo}\`;
188+
let url = \`https://github.com/${repo}\`;
189189
return (
190190
&lt;a href={url} class="stars"&gt;
191191
⭐️ {stars} Stars

0 commit comments

Comments
 (0)