trunk
trunk copied to clipboard
Error overlay in rendered html
When an error occurs in Trunk, whether it's in the Rust compilation or a unresolved file, it would be great for Trunk to create an overlay in the generated html to display the error to the user. Snowpack, a JS bundler, has one of the most esthetically pleasing error overlays out there:
Love it. This will tie in quite nicely with our work on the WebSocket auto-reload feature.
I’ll get this issue triaged and labeled shortly.
I’m thinking that what we will want to do is actually build a mini WASM app which we can put on our release page. It will encapsulate all of the WebSocket log, overlay code/css &c. Then we inject that code when running in dev mode.
I’m thinking that what we will want to do is actually build a mini WASM app which we can put on our release page. It will encapsulate all of the WebSocket log, overlay code/css &c. Then we inject that code when running in dev mode.
Is a Rust WASM app, no matter how "mini" really necessary? I believe it would be much simpler to write it in about 100 lines of good ol' JS and be done with it. Really, all we need to do is listen for a message on a web socket and reload the page or display an error in a modal.
In addition, even a simple WASM app that interfaces with DOM using web-sys
would be 50KB at best and 90+ KB at worst.
I would like to work on this.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.