Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module parse failure make the file unwatchable #91

Open
jeiea opened this issue Oct 21, 2023 · 0 comments
Open

Module parse failure make the file unwatchable #91

jeiea opened this issue Oct 21, 2023 · 0 comments

Comments

@jeiea
Copy link

jeiea commented Oct 21, 2023

Steps to reproduce

  1. Prepare the following files.
// a.ts
import "./b.ts";
// b.ts
export {};
  1. Run esbuild a.ts in watch mode with esbuild_deno_loader.
  2. Append ,, to b.ts and save.
  3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant