mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 04:39:10 +00:00

We were effectively ignoring our diagnostics, and instead falling back to esbuild (and then displaying the esbuild diagnostics). That was mostly for simplicity and so we would fall back to esbuild handling unsupported things (for instance css imports). This does a small refactor on the module loader to give us an API that doesn't have to adhere to the deno_core ModuleLoader API. That lets us return and handle errors more concretely, instead of having indirection and downcasting. Now, we only ignore our errors about being unable to load unsupport file types, and the rest we handle ourselves. I've also aligned the formatting of esbuild errors with ours, so it should be more uniform. A few examples (dbgdeno is just an alias for the debug build of this PR): 
1 line
20 B
TypeScript
1 line
20 B
TypeScript
import "./foo.css";
|