Skip to content

Deploying markdown example w/ Dart 3.7.2 fails #3930

Closed
@kevmoo

Description

@kevmoo

Generates the following app.dart.js file, which is not valid

(async () => {
const thisScript = document.currentScript;

function relativeURL(ref) {
  const base = thisScript?.src ?? document.baseURI;
  return new URL(ref, base).toString();
}

if ('WebAssembly' in self && WebAssembly.validate(new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 5, 1, 95, 1, 120, 0]));) {

let { compileStreaming } = await import("./app.mjs");

let app = await compileStreaming(fetch(relativeURL("app.wasm")));
let module = await app.instantiate({});
module.invokeMain();

} else {
const scriptTag = document.createElement("script");
scriptTag.type = "application/javascript";
scriptTag.src = relativeURL("./app.dart2js.js");
document.head.append(scriptTag);
}

})();

This problem does not exist with Dart @ master

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions