Skip to content

Commit

Permalink
preload the WASM file even though the version is undefined. (rollup#5618
Browse files Browse the repository at this point in the history
)

preload the WASM file even though the version is undefined
  • Loading branch information
TrickyPi authored Aug 19, 2024
1 parent 9625890 commit 262a388
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/repl/stores/rollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ function getRollupJsUrl({ type, version }: RollupRequest) {
function getRollupWasmFileUrl({ type, version }: RollupRequest) {
if (type === 'pr') {
return getFullUrlFromAWS(version, ROLLUP_WASM_FILE);
} else if (type === 'version' && version && isRollupVersionAtLeast(version, 4, 0)) {
return getFullUrlFromUnpkg(version, ROLLUP_WASM_FILE);
} else if (type === 'version') {
if (!version) {
return getFullUrlFromUnpkg(undefined, ROLLUP_WASM_FILE);
} else if (isRollupVersionAtLeast(version, 4, 0)) {
return getFullUrlFromUnpkg(version, ROLLUP_WASM_FILE);
}
}
}

Expand Down

0 comments on commit 262a388

Please sign in to comment.