Open joker77877 opened 3 years ago
yes! me too
Can you solve it quickly? It will affect code debugging.
me too
Same issue.
please fix it
I have solved this problem. Add build: { sourcemap: true, },
to vite.config.js and it should work fine. This plugin depends this config to generate sourcemap.
BTW, need to disable cache after changing the setting.
@smallp this doesn't help me. I have latest version of vite (2.7.13), vite-plugin-vue2 (1.9.3) and unplugin-vue-components (0.17.14), build.sourcemap is set to true in vite config, but I still get incorrect source map: There should be imports of vuetify components (v-container, v-row, etc)
@smallp this doesn't help me. I have latest version of vite (2.7.13), vite-plugin-vue2 (1.9.3) and unplugin-vue-components (0.17.14), build.sourcemap is set to true in vite config, but I still get incorrect source map: There should be imports of vuetify components (v-container, v-row, etc)
You dont have to set build.sourcemap now. Try again and give me a sample if it still cannot work.
@smallp try this https://github.com/Djaler/unplugin-vue-components-vite-source-map-bug
As you can see, we can place debugger only on line 16. Also, if you click button on page, you'll stop on line 16, while debugger statement present on line 20
@Djaler Yes, the source map of build result is wrong. But you can use npm run dev
. That works fine.
Sure, but I need correct maps in production, because of Sentry
Sure, but I need correct maps in production, because of Sentry
Sorry, I'm not able to help you. I dont know the process of building.
Sure, but I need correct maps in production, because of Sentry
can you set breakpoint in your project? i clone your project, then click the button, console out put "could not load the sourcemap 404"
i'm using vue3 + vite with this plugin, upgrade plugin to latest version. still can not set breakpoint in devtools
me too
me too
Well, I spent hours and now I know unplugin-vue-components
is causing my issue and there is no solution
We spent ages trying to figure out the reason debugging was not working in our new project and also finally made this same discovery today. It seems that Composition API code debugging works but not Options API. Is there any potential resolution for this? Thank you.
We have the same problem + our tests coverage is wrong!
Same problem here, any updates ?
i got same problem
Hello i have found a work-around that works for me: add this to vue file:
<script setup>
// work-around https://github.com/antfu/unplugin-vue-components/issues/219
</script>
Yeah the script setup
is working but it's a problem if your whole codebase isn't based on script setup
does any one resolve this problem?
i use <script lang="jsx setup> will apprear this problem
I fixed this problem a year ago, but I’m not sure which of the following changes took effect.
so? how to reslove?
how to reslove? this error afftect developing sence a lot.
This is a huge issue, that needs to be fixed... This has been an issue since 2021 and I am surprised there has been no attempt at fixing this. Test coverage being broken is one thing, but source map being broken entirely is even worse, if you have any sort of error tracking, like Sentry, that relies on it... I was quite excited to use this, but seems like it's not worth it
Using this plugin, if the Vue version is greater than 3 and the options syntax is used in the component, the bug of the debugger offset will be reappear!!!
Using this plugin, if the Vue version is greater than 3 and the options syntax is used in the component, the bug of the debugger offset will be reappear!!!
me too
Using this plugin, if the Vue version is greater than 3 and the options syntax is used in the component, the bug of the debugger offset will be reappear!!!
yes, i got same problem. this problem occurs in jsx or tsx.
unplugin-vue-components": "^0.25.0", "vue": "^3.2.47", "vite": "^4.3.9", "@vitejs/plugin-vue-jsx": "^3.0.1"
What a terrible bug! It completely undermines the Vue 3 DX, wasting a significant amount of time for those using this library in enterprise projects and forcing people into a 996 work schedule. This bug has persisted for a year and a half now...
使用 Githubissues.
When using this plugin, I can't normally debugging in chrome. For example, I can't set breakpoint at below position:
reproduce repositiory: https://github.com/joker77877/vue3-ts-eslint/blob/master/src/components/HelloWorld.vue