Skip to content

module execution fails silently #654

@krichprollsch

Description

@krichprollsch

When a modules contains a JS error, it isn't correctly reported by the browser and fails silently.

Example with the following HTML:

<!DOCTYPE html>
<html><head></head><body>
    <script type="module">
        console.log("in");
        const a = undefined;
        let b = a.foo;
        console.log("out");
    </script>
</body></html>

expected result

$ zig build run -- fetch  http://127.0.0.1:1234/error.html
info(page): GET http://127.0.0.1:1234/error.html 200
info(console): in
info(page): eval script inline: TypeError: Cannot read properties of undefined (reading 'foo')

current result

$ zig build run -- fetch  http://127.0.0.1:1234/error.html
info(page): GET http://127.0.0.1:1234/error.html 200
info(console): in

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions