Open Rich-Harris opened 11 months ago
Ugly in what sense? And what would make them nicer?
Stuff like this:
Showing a stack trace that is purely internal SvelteKit stuff is totally unnecessary — the user can't do anything with it, we should just print a bold red message.
For certain errors like the options validation that makes sense, for others having the stack trace - even if it leads into internals - is very helpful. You get something to start at.
Stack trace aside, the path to the file causing the build error should be printed. The messages can be rather useless sometimes, e.g.
CompileError: Block was left open
This could be anywhere.
Broke something among dozens of components and had to start the build itself in debug mode to find out which component was actually responsible (via a breakpoint in compileSvelte
within the Vite plugin).
Looks like svelte-check
can help out as well, it points to the file and shows the exact location. The build output should ideally do the same.
Describe the problem
errors encountered during build (e.g. when reading config, or when a page fails to render) are kinda ugly. pretty sure we could make them way nicer quite easily
Describe the proposed solution
nicer errors
Alternatives considered
No response
Importance
nice to have
Additional Information
No response