diff --git a/hosts/ocaml/browser/sx-platform.js b/hosts/ocaml/browser/sx-platform.js index 59b6c263..50bfa3a7 100644 --- a/hosts/ocaml/browser/sx-platform.js +++ b/hosts/ocaml/browser/sx-platform.js @@ -506,19 +506,9 @@ // will see it as already loaded and skip rather than infinite-looping. _loadedLibs[name] = true; - // Load this module. - // Non-library modules (no space in name, e.g. "hs-runtime") use source - // loading so their defines go into the CEK global env — needed when - // eval-expr-cek evaluates compiled hyperscript at runtime. - var isLibrary = name.indexOf(' ') >= 0 || name === '_entry'; - var ok; - if (isLibrary) { - ok = loadBytecodeFile("sx/" + info.file); - if (!ok) { - var sxFile = info.file.replace(/\.sxbc$/, '.sx'); - ok = loadSxFile("sx/" + sxFile); - } - } else { + // Load this module (bytecode first, fallback to source) + var ok = loadBytecodeFile("sx/" + info.file); + if (!ok) { var sxFile = info.file.replace(/\.sxbc$/, '.sx'); ok = loadSxFile("sx/" + sxFile); } diff --git a/shared/static/wasm/sx-platform.js b/shared/static/wasm/sx-platform.js index 59b6c263..50bfa3a7 100644 --- a/shared/static/wasm/sx-platform.js +++ b/shared/static/wasm/sx-platform.js @@ -506,19 +506,9 @@ // will see it as already loaded and skip rather than infinite-looping. _loadedLibs[name] = true; - // Load this module. - // Non-library modules (no space in name, e.g. "hs-runtime") use source - // loading so their defines go into the CEK global env — needed when - // eval-expr-cek evaluates compiled hyperscript at runtime. - var isLibrary = name.indexOf(' ') >= 0 || name === '_entry'; - var ok; - if (isLibrary) { - ok = loadBytecodeFile("sx/" + info.file); - if (!ok) { - var sxFile = info.file.replace(/\.sxbc$/, '.sx'); - ok = loadSxFile("sx/" + sxFile); - } - } else { + // Load this module (bytecode first, fallback to source) + var ok = loadBytecodeFile("sx/" + info.file); + if (!ok) { var sxFile = info.file.replace(/\.sxbc$/, '.sx'); ok = loadSxFile("sx/" + sxFile); }