vuejs / vue-loader

📦 Webpack loader for Vue.js components
MIT License
4.99k stars 915 forks source link

Vue template compiler/loader should generate source maps for template blocks #1507

Open ffxsam opened 5 years ago

ffxsam commented 5 years ago

What problem does this feature solve?

Vue should be able to generate source maps for <template> blocks. We can enable source maps today, but when an error occurs in a template, it's not entirely helpful:

image

There should be a way to enable source maps via vue.config.js that would signal the template compiler to generate source maps (if possible?) in raw markup.

Justineo commented 5 years ago

See https://github.com/vuejs/vue/issues/9629#issuecomment-469844575.

souredoutlook commented 2 years ago

Sorry for zombie posting on this @yyx990803, just following up with the comment you made in vuejs/vue#9629

It seems like there was a solution for this in Vue 3. For folks that can't or won't migrate from Vue 2 is there a way to bring that fix backwards into Vue 2?

stefanKuijers commented 2 years ago

We were looking into this as well. Does anyone know a solution for Vue2 for now? Cause even though we'd love to move to Vue3 it's gonna take a while.