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

Component & file names comment markup is missing in svelte v5 #14952

Open
harshmandan opened this issue Jan 8, 2025 · 7 comments
Open

Component & file names comment markup is missing in svelte v5 #14952

harshmandan opened this issue Jan 8, 2025 · 7 comments

Comments

@harshmandan
Copy link

Describe the bug

In svelte v4, the markup in dev mode would contain the file name & components names in the html markup as comments. Here's a screenshot:
image

But in svelte v5, the markup now omits the file name & comment names in dev mode, making it hard to parse the markup in large apps.

image

Reproduction

For v4:
https://stackblitz.com/edit/sveltejs-kit-template-default-k8mk4s?file=package.json

For v5:
https://stackblitz.com/edit/sveltejs-kit-template-default-xkgpk8fk?file=package.json

Logs

No response

System Info

System:
    OS: macOS 15.2
    CPU: (8) arm64 Apple M1 Pro
    Memory: 123.53 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm
    pnpm: 9.15.3 - ~/.nvm/versions/node/v20.11.0/bin/pnpm

Severity

blocking an upgrade

@dummdidumm
Copy link
Member

I can't reproduce this - opening your Stackblitz link for v4 does not show any comments, nor can I remember that we ever had something like this in dev mode. Could this be from another source? An extension adding these, etc ?

@dummdidumm dummdidumm added the awaiting submitter needs a reproduction, or clarification label Jan 8, 2025
@Conduitry
Copy link
Member

I'm seeing those comments in the v4 StackBlitz. I do also recall seeing them before. I don't have any extensions that would be adding them. I'm seeing them both in Firefox and in Chromium.

@Thiagolino8
Copy link

I'm also seeing those comments in the v4 StackBlitz and I do also recall seeing them before.

@harshmandan
Copy link
Author

The screenshots are from the stackblitz repo. Are you inspecting the correct element? (It should be inside an iframe)

@dummdidumm dummdidumm removed the awaiting submitter needs a reproduction, or clarification label Jan 8, 2025
@dummdidumm
Copy link
Member

Apologies, I must've looked in the wrong place, I see them too, though I really don't recall that part of the compiler. @Conduitry is this some dev only thing that was present once? Looking at the compiler output of v4 there's nothing obvious standing out.

@harshmandan

This comment was marked as outdated.

@harshmandan
Copy link
Author

Looking at the compiler output of v4 there's nothing obvious standing out.

I also couldn't find the logic anywhere. I looked in svelte-4 branch & in the vite-plugin-svelte repo.

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

4 participants