Skip to content

Template is not mapped in sourcemap on Vite applications #12682

Closed
@mertcb

Description

@mertcb

Vue version

3.5.13

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-mpsjmqwf?file=package.json

Steps to reproduce

Run npm install on slackblitz then, run npm run build then npm run preview. You'll see some dist js and map files at dist/assets folder. Then open inspect tab in your browser and click throw error. When you upload map file to https://evanw.github.io/source-map-visualization/ and select HelloWorld.vue file, you can see only ref(0) part is mapped.

What is expected?

I expect all source code for SFC has been mapped

What is actually happening?

When you upload map file to https://evanw.github.io/source-map-visualization/ and select HelloWorld.vue file like mentioned above, you can see only ref(0) part is mapped.

System Info

System:
    OS: macOS 15.0.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 88.73 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.9.2 - ~/.nvm/versions/node/v20.10.0/bin/npm
  Browsers:
    Chrome: 131.0.6778.205
    Edge: 131.0.2903.112
    Safari: 18.0.1
  npmPackages:
    @vitejs/plugin-vue: ^5.2.1 => 5.2.1 
    vite: ^6.0.7 => 6.0.7

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions