You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Severity
It's not severe, but it it annoying. It's possible to work around it by escaping/HTML-encoding the JS text.
I'm not sure whether this is something to be solved at the vite-plugin-svelte or svelte-hmr level. I can move the issue to the appropriate repro as needed.
Describe the bug
When JavaScript is in a string, HMR code is inserted into it.
is displayed in the browser as
Repro
https://github.com/kwangure/sveltekit-javascript-repro
Expected behavior
HMR code should not be injected into strings.
SvelteKit installation information
System:
OS: Linux 5.4 Ubuntu 20.04.2 LTS (Focal Fossa)
CPU: (4) x64 Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
Memory: 1.56 GB / 3.05 GB
Container: Yes
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 16.2.0 - /usr/bin/node
npm: 7.13.0 - /usr/bin/npm
npmPackages:
@sveltejs/adapter-static: ^1.0.0-next.13 => 1.0.0-next.13
@sveltejs/kit: ^1.0.0-next.113 => 1.0.0-next.113
svelte: ^3.38.2 => 3.38.2
Severity
It's not severe, but it it annoying. It's possible to work around it by escaping/HTML-encoding the JS text.
I'm not sure whether this is something to be solved at the
vite-plugin-svelte
orsvelte-hmr
level. I can move the issue to the appropriate repro as needed.Somewhat related issue: #1654
The text was updated successfully, but these errors were encountered: