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
Currently we require both scriptMap (aka map or resolvedMap in above code) and templateMap existing to concat templateMap with scriptMap. If scriptMap is empty, then templateMap will not be used at all.
Related Issue
#2959 is similar with this one, but it was reporting the missing of sourcemap in prod. These two issues are related, and potentially to have a same / similar root cause, but I think they are different.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
Describe the bug
Create a vue SFC without script block
NoSourceMap.vue
:Check the devtools, you'll find that it does not have sourcemap at the end of the transformed file:
Compared with a SFC with non-empty script block:
Suspicious Code
vite/packages/plugin-vue/src/main.ts
Lines 159 to 162 in 4e6c26f
Currently we require both
scriptMap
(akamap
orresolvedMap
in above code) andtemplateMap
existing to concattemplateMap
withscriptMap
. IfscriptMap
is empty, thentemplateMap
will not be used at all.Related Issue
#2959 is similar with this one, but it was reporting the missing of sourcemap in prod. These two issues are related, and potentially to have a same / similar root cause, but I think they are different.
Reproduction
https://stackblitz.com/edit/vitejs-vite-mseree?file=src/NoSourceMap.vue
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: