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

<script setup lang="ts"> sourcemap does not display the sfc source correctly #2023

Open
1593292349 opened this issue Dec 31, 2022 · 1 comment

Comments

@1593292349
Copy link

1593292349 commented Dec 31, 2022

Vue version

3.2.45

Link to minimal reproduction

https://github.com/1593292349/sfc-sourcemap.git

Steps to reproduce

  1. checkout master branch
  2. Installation dependency and run the command npm run build
  3. open the file dist/index.html
  4. look at the source panel for developer tools

What is expected?

I'd like to see the original sfc code.
image

What is actually happening?

image

System Info

System:                                                        
    OS: Windows 10 10.0.19044                                    
    CPU: (24) x64 AMD Ryzen 9 5900X 12-Core Processor            
    Memory: 13.18 GB / 31.92 GB                                  
  Binaries:                                                      
    Node: 16.18.1 - C:\Program Files\nodejs\node.EXE             
    npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD                
  Browsers:                                                      
    Edge: Spartan (44.19041.1266.0), Chromium (108.0.1462.54)    
    Internet Explorer: 11.0.19041.1566                           
  npmPackages:                                                   
    vue: ^3.2.45 => 3.2.45

Any additional comments?

If I put the <script setup lang="ts"> Change to <script setup> You can see the original code

@1593292349
Copy link
Author

1593292349 commented Dec 31, 2022

in vue3, <script setup lang="ts"> is wrong, <script setup> is right.
in vue2,<script setup lang="ts"> has same problem with vue3, <script setup> is also wrong
If you want to reproduce the vue2 problem, just switch to the branch of vue and repeat the same procedure

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