esbuild_deno_loader
esbuild_deno_loader copied to clipboard
Module parse failure make the file unwatchable
Steps to reproduce
- Prepare the following files.
// a.ts
import "./b.ts";
// b.ts
export {};
- Run esbuild a.ts in watch mode with esbuild_deno_loader.
- Append
,,
to b.ts and save. - Remove
,,
from b.ts and save.
Expected behavior
Error is recovered and it should be built.
Actual behavior
Some error like the following and nothing happens.
[ERROR] The module's source code could not be parsed: Unexpected token `,`. Expected identifier, string literal, numeric literal or [ for the computed key at
If we modify a.ts, it works fine again.
Additional context
https://github.com/jeiea/esbuild_deno_loader this works as expected, but it feels like monkey patching.
I think it should fail on load phase, not resolve phase.