Open tucker87 opened 3 months ago
In case you want to replicate my test.
mycomponent.vue
<template>
Hi {{ a }} {{ b }}
</template>
<script setup>
import {ref} from 'vue'
import b from './index.mjs'
const a = ref(null)
a.value = 1
console.log(a)
//console.log(b)
</script>
index.mjs
console.log('index.mjs running')
a = 2;
let a = 1;
console.log(a)
export default a
Hey all, I've spent some free time the last couple weeks digging into this project. And I have a loose grasp on it now.
I really want to use this but I find debugging errors to be quite challenging so I set out to see if I could get sourceMaps to show up.
I see some notes in the code about removing sourceMaps so maybe I'm missing some other feature that helps with this issue?
I've push my work so far here. (The changes are a mess, and many are just trial/error) https://github.com/tucker87/vue3-sfc-loader
I've gotten the source maps to show up and the error message does have a link to the error. But the line seems to be wrong, it's one line lower than it should be. This may be due to the code being wrapped in an anonymous function just before it is read?
Note: The
.mjs.v
file comes from the intermediary code. It was being called "unknown" and I just gave it a name to help me debug.Is this a feature I should continue to work on?