Skip to content

Commit 8333afd

Browse files
committed
feat: native lazy load imports
1 parent f7b067e commit 8333afd

603 files changed

Lines changed: 10453 additions & 663 deletions

File tree

Some content is hidden

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

.changeset/bold-groups-dance.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"marko": patch
3+
"@marko/runtime-tags": patch
4+
"@marko/compiler": patch
5+
---
6+
7+
Add support for native lazy import api.

.sizes.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
{
88
"name": "*",
99
"total": {
10-
"min": 21132,
11-
"brotli": 7918
10+
"min": 22354,
11+
"brotli": 8342
1212
}
1313
},
1414
{
@@ -19,11 +19,11 @@
1919
},
2020
"runtime": {
2121
"min": 4053,
22-
"brotli": 1803
22+
"brotli": 1802
2323
},
2424
"total": {
2525
"min": 4216,
26-
"brotli": 1923
26+
"brotli": 1922
2727
}
2828
},
2929
{
@@ -34,11 +34,11 @@
3434
},
3535
"runtime": {
3636
"min": 2360,
37-
"brotli": 1225
37+
"brotli": 1228
3838
},
3939
"total": {
4040
"min": 2449,
41-
"brotli": 1304
41+
"brotli": 1307
4242
}
4343
},
4444
{
@@ -48,12 +48,12 @@
4848
"brotli": 393
4949
},
5050
"runtime": {
51-
"min": 6413,
52-
"brotli": 2825
51+
"min": 6415,
52+
"brotli": 2813
5353
},
5454
"total": {
55-
"min": 7095,
56-
"brotli": 3218
55+
"min": 7097,
56+
"brotli": 3206
5757
}
5858
},
5959
{
@@ -64,11 +64,11 @@
6464
},
6565
"runtime": {
6666
"min": 2532,
67-
"brotli": 1287
67+
"brotli": 1282
6868
},
6969
"total": {
7070
"min": 2654,
71-
"brotli": 1391
71+
"brotli": 1386
7272
}
7373
}
7474
]

.sizes/comments.csr/runtime.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// size: 6413 (min) 2825 (brotli)
1+
// size: 6415 (min) 2813 (brotli)
22
//#region packages/runtime-tags/dist/dom.mjs
33
let decodeAccessor = (num) =>
44
(num + (num < 26 ? 10 : num < 962 ? 334 : 11998)).toString(36),
@@ -144,7 +144,7 @@ function schedule() {
144144
isScheduled || ((isScheduled = 1), queueMicrotask(flushAndWaitFrame));
145145
}
146146
function flushAndWaitFrame() {
147-
(run(), requestAnimationFrame(triggerMacroTask));
147+
(requestAnimationFrame(triggerMacroTask), run());
148148
}
149149
function triggerMacroTask() {
150150
(channel ||

.sizes/comments.ssr/runtime.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// size: 2532 (min) 1287 (brotli)
1+
// size: 2532 (min) 1282 (brotli)
22
//#region packages/runtime-tags/dist/dom.mjs
33
let decodeAccessor = (num) =>
44
(num + (num < 26 ? 10 : num < 962 ? 334 : 11998)).toString(36),
@@ -41,7 +41,7 @@ function schedule() {
4141
isScheduled || ((isScheduled = 1), queueMicrotask(flushAndWaitFrame));
4242
}
4343
function flushAndWaitFrame() {
44-
(run(), requestAnimationFrame(triggerMacroTask));
44+
(requestAnimationFrame(triggerMacroTask), run());
4545
}
4646
function triggerMacroTask() {
4747
(channel ||

.sizes/counter.csr/runtime.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// size: 4053 (min) 1803 (brotli)
1+
// size: 4053 (min) 1802 (brotli)
22
//#region packages/runtime-tags/dist/dom.mjs
33
let decodeAccessor = (num) =>
44
(num + (num < 26 ? 10 : num < 962 ? 334 : 11998)).toString(36),
@@ -127,7 +127,7 @@ function schedule() {
127127
isScheduled || ((isScheduled = 1), queueMicrotask(flushAndWaitFrame));
128128
}
129129
function flushAndWaitFrame() {
130-
(run(), requestAnimationFrame(triggerMacroTask));
130+
(requestAnimationFrame(triggerMacroTask), run());
131131
}
132132
function triggerMacroTask() {
133133
(channel ||

.sizes/counter.ssr/runtime.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// size: 2360 (min) 1225 (brotli)
1+
// size: 2360 (min) 1228 (brotli)
22
//#region packages/runtime-tags/dist/dom.mjs
33
let decodeAccessor = (num) =>
44
(num + (num < 26 ? 10 : num < 962 ? 334 : 11998)).toString(36),
@@ -41,7 +41,7 @@ function schedule() {
4141
isScheduled || ((isScheduled = 1), queueMicrotask(flushAndWaitFrame));
4242
}
4343
function flushAndWaitFrame() {
44-
(run(), requestAnimationFrame(triggerMacroTask));
44+
(requestAnimationFrame(triggerMacroTask), run());
4545
}
4646
function triggerMacroTask() {
4747
(channel ||

0 commit comments

Comments
 (0)