Skip to content

Commit 262a388

Browse files
authored
preload the WASM file even though the version is undefined. (#5618)
preload the WASM file even though the version is undefined
1 parent 9625890 commit 262a388

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/repl/stores/rollup.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,12 @@ function getRollupJsUrl({ type, version }: RollupRequest) {
3737
function getRollupWasmFileUrl({ type, version }: RollupRequest) {
3838
if (type === 'pr') {
3939
return getFullUrlFromAWS(version, ROLLUP_WASM_FILE);
40-
} else if (type === 'version' && version && isRollupVersionAtLeast(version, 4, 0)) {
41-
return getFullUrlFromUnpkg(version, ROLLUP_WASM_FILE);
40+
} else if (type === 'version') {
41+
if (!version) {
42+
return getFullUrlFromUnpkg(undefined, ROLLUP_WASM_FILE);
43+
} else if (isRollupVersionAtLeast(version, 4, 0)) {
44+
return getFullUrlFromUnpkg(version, ROLLUP_WASM_FILE);
45+
}
4246
}
4347
}
4448

0 commit comments

Comments
 (0)