Skip to content

parse error is swallowed when bad edit occurs via HMR #588

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

Closed
benmccann opened this issue Feb 10, 2023 · 0 comments · Fixed by #592
Closed

parse error is swallowed when bad edit occurs via HMR #588

benmccann opened this issue Feb 10, 2023 · 0 comments · Fixed by #592
Labels
bug Something isn't working

Comments

@benmccann
Copy link
Member

Describe the bug

I got the message "Unexpected token" with no further details to help me

Reproduction URL

https://github.com/vitejs/vite/tree/main/packages/create-vite/template-svelte

Reproduction

Create and run a new Svelte project:

npm create vite@latest my-svelte-app -- --template svelte
cd my-svelte-app
npm install
npm run dev

Add {if} to a .svelte template that's open in the browser. It will just say "Unexpected token" with no further details. However, if you refresh the page it will correctly show the frame where the error occurs

Logs

No response

System Info

npmPackages:
    @sveltejs/vite-plugin-svelte: ^2.0.2 => 2.0.2 
    svelte: ^3.55.1 => 3.55.1 
    vite: ^4.1.0 => 4.1.1
@benmccann benmccann added bug Something isn't working triage Awaiting triage by a project member labels Feb 10, 2023
@dominikg dominikg removed the triage Awaiting triage by a project member label Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants